World: r3wp
[!RebGUI] A lightweight alternative to VID
older newer | first last |
Graham 25-Feb-2010 [8650x2] | If you're going to try and encapsulate inside a context, why not provide the method to update the gui inside the context? |
BTW, if you're hiding field names then my experience is that you need to use closures instead of functions. | |
jack-ort 25-Feb-2010 [8652] | Thank you, Graham, for the continued feedback. I'm ashamed to say I don't even understand your last comment - this newbie will have to go research "closures". Your previous comment - that sounds like a good approach - I'll have to learn more to do that. I can only learn something by trying to use it to solve real problems; the bad news for me is that in this case I'm new to GUIs, REBOL and RebGUI. |
Graham 25-Feb-2010 [8653] | If you search on closures in this thread it will explain the issue it solves |
Ashley 26-Feb-2010 [8654] | Get something that's simple working first ... then add complexity. I tend to "encapsulate" my GUIs in functions with generic widget identifiers, such as: show-add-user: make function! [/local f1 f2 f3] [ display "Add User" [ after 2 text ... f1: field text ... f2: field text ... f3: field bar reverse button [f1/text: ...] do [...] ] ] If you can get this working then the problem shifts from being a RebGUI problem to a context problem (which more people can assist with in the Core or REBOL2 groups). |
jack-ort 26-Feb-2010 [8655] | Ashley - thanks for pointing me in the right direction! |
Claude 10-Mar-2010 [8656x2] | hi, rebgui 1.1.8 don't work with rebol 2.7.7 for linux !!!!! segment fault !!!! |
ashley, do you have a fixe for it , regards | |
Graham 10-Mar-2010 [8658] | Isn't the issue with 2.7.7 linux |
Claude 10-Mar-2010 [8659x4] | for windows no problem |
rebol 2.7.7 + rebgui 1.1.8 + my program => no problem | |
rebol 2.7.7 linux + regbui 1.18 + tour.r of rebgui => segment fault !!!!! | |
i use a mint based on ubuntu 8.10 !!!! | |
Graham 10-Mar-2010 [8663] | It's a linux build issue ... keep using 2.7.6 |
Claude 10-Mar-2010 [8664] | oki thanks |
Graham 10-Mar-2010 [8665x2] | check the linux group here |
Gabriele mentions a segm. fault | |
Gabriele 10-Mar-2010 [8667] | If RebGUI is using draw, that would confirm what I'm seeing here as well. Must say that I'm using Mint as well, so this still does not rule out that it is a distribution specific issue (as other people reported it working). |
Henrik 10-Mar-2010 [8668] | Gabriele, could you try the style browser for the vid extension kit, please? AFAIR there is little to no DRAW used in it. do http://97.107.135.89/www.hmkdesign.dk/data/projects/vid-ext-kit/downloads/style-browser.r |
Andreas 10-Mar-2010 [8669x3] | vid-ext seems to work fine for me, using rebview 2.7.7 on ubuntu |
(if that's any help) | |
the vid ext style browser works, that is | |
Henrik 10-Mar-2010 [8672] | Andreas, if rebgui fails on your setup, then there is possibly a DRAW issue. |
Andreas 10-Mar-2010 [8673x3] | hm, let me see if i have something to test rebgui lying around |
a small rebgui app of mine using build 93 of rebgui works just fine | |
and the rebgui demo app using build 117 from the viewtop also works fine | |
Henrik 10-Mar-2010 [8676] | if you didn't have problems before, then your setup is probably not the cause like in Claude's case. |
Gabriele 11-Mar-2010 [8677] | Henrik: that seems to work fine. I haven't clicked all the styles, but most of them. I think that only DRAW crashes. |
Henrik 11-Mar-2010 [8678] | Gabriele, ok. also try to simply click the first style and hold down the down cursor key. then you will scroll through all styles. |
Steeve 11-Mar-2010 [8679x3] | btw, map-event crash if the event doesn't contain a gob. |
btw 2/, We can not set the gob attribute on custom events (using make event!) | |
Ah ! wrong thread | |
BudzinskiC 16-Apr-2010 [8682] | I need help! But that aside, how can I scroll programatically to a certain position in an area? I was able to scroll to the very end by doing this: textarea/para/scroll/y: negate (textarea/text-y - textarea/size/y) show textarea But the scrollbar handle stays at the top when doing this. I haven't yet found out how I can access the scrollbar from the area which is probably what I will have to do to solve this, right? |
Ashley 16-Apr-2010 [8683] | display "test" [ a: area (mold ctx-rebgui/colors) button [a/pane/data: .5 show a] ] |
BudzinskiC 16-Apr-2010 [8684] | Thanks a lot :) Before I do something completely wrong again... I also want to scroll to a certain line in the text area if possible. My approach now would be to see if I can somehow see how many lines of text are displayed in the text area, calculate the percentage of the line I want to scroll to based on this total number of lines, divide that by 100 and use it for a/pane/data. Right..? |
Graham 16-Apr-2010 [8685] | Is that informatio available? |
BudzinskiC 16-Apr-2010 [8686] | This seems to work: display "test" [ a: area (mold ctx-rebgui/colors) button [ scroll-to-line: 5 line-height: 30 total-lines: (second size-text a) / line-height percent: ((scroll-to-line - 1) / (total-lines / 100)) / 100 a/pane/data: percent show a ] ] The height of a line is hardcoded though which means it stops working if the font size is changed. Is there a way to get the current line height? |
Graham 16-Apr-2010 [8687] | presumably you need to get the font information out |
BudzinskiC 16-Apr-2010 [8688] | a/font/size gives me the font size, which is 12 by default. But does that help in getting the line height? Is there some kind of standard so that a font with the size 12 always has a height of font-size * something? Don't know anything about fonts... |
Graham 16-Apr-2010 [8689] | Nor me ... |
BudzinskiC 16-Apr-2010 [8690] | :) Thanks anyhow |
Graham 16-Apr-2010 [8691x2] | but if you can get the font name, font size you should be able to create some text and then get the sizes from that |
So, instead of using your whole area, just use one character in a face | |
BudzinskiC 16-Apr-2010 [8693] | Ah you mean like in an invisible text container? That should work, right. Thanks :) |
Graham 16-Apr-2010 [8694] | Yep, something like that :) |
Ashley 18-Apr-2010 [8695] | ctx-rebgui/sizes/font-height |
BudzinskiC 18-Apr-2010 [8696] | Thanks Ashley. That only shows the height for the default font though. I am displaying three text areas with different font sizes, so I set the font size in the areas directly. I had to use an invisible text area now anyway though because I forgot that to be able to scroll to a certain line in the text area I have to find out in which line a certain word, to which I want to scroll, actually is :) So now I made a test text area for this and positioned the "real" text area on top of it so that the test text area is completely covered by it. I copy the text up till the word I want to scroll to into the test text area and then look at the text size of the test text area and use that information to scroll the "real" text area to this word. It isn't working correctly yet but it should so I guess I just made a stupid mistake somewhere, have to look at it again tomorrow. |
Graham 18-Apr-2010 [8697] | Good luck! We need this for the spell checker |
Claude 23-Apr-2010 [8698] | hi, how i can force a field to be disabled ? i try myfield/options: [info] but it don't work !!!! |
BudzinskiC 23-Apr-2010 [8699] | You can toggle enabled/disabled with the set-state function. Example app: display "test" [a: field do [set-state a]] do-events |
older newer | first last |