World: r3wp
[!RebGUI] A lightweight alternative to VID
older newer | first last |
Ashley 1-Jun-2007 [6612] | Trick is to remember that the do block is evaluated prior to the display being shown, so you just have to use: display "" [ p: panel green data [] false f: field false do [p/show?: f/show?: true] ] do-events |
Graham 1-Jun-2007 [6613x2] | Thanks |
but isn't the layout constructed first otherwise the variable names would not be available? | |
Ashley 1-Jun-2007 [6615] | Yes, but doing a show or hide prior to view doesn't work. |
Graham 1-Jun-2007 [6616x3] | Ok. |
in lists and tables, scroll bars appear dynamicallly | |
Is it feasible to do the same for area widget? | |
Ashley 2-Jun-2007 [6619] | The reason most UI's dont do this is you either have to reserve space for the slider, leaving an empty area, or dynamically readjust the text to fit ... which annoys users as the number of lines changes on them. So, no. ;) |
Pekr 2-Jun-2007 [6620] | Ashley - well, how often there is the change of text size, so that there is, or is not the need for slider? ;-) Once? |
Robert 8-Jun-2007 [6621] | How about using Chris' script to support input-patterns: http://www.rebol.org/cgi-bin/cgiwrap/rebol/view-script.r?script=filtered-import.r |
btiffin 9-Jun-2007 [6622] | How do you get a slider to react to the mouse wheel? |
Graham 9-Jun-2007 [6623x2] | move the wheel? |
I'm pretty sure mouse wheel support is implemented. | |
btiffin 9-Jun-2007 [6625x3] | Yeah, it's not reacting. I've tried forcing focal-face, no effect. ?? |
I've tried a custom widget with an action: make default-action [ but I might be missing something simple but critical... | |
From what I can understand from other widget code, say area...the on-scroll is sent to the area...I need it to go right to the slider for the scheme I'm attempting... Umm, I think... | |
Ashley 9-Jun-2007 [6628] | You have to do it indirectly, as in: display "" [ p: panel data [slider] on-scroll [ var: face/pane/1 var/data: var/data + either negative? scroll/y [-.1][.1] show var ] do [system/view/focal-face: p] ] |
btiffin 9-Jun-2007 [6629x2] | Ashley; Thanks. |
Works nicely. Need to build the boundary fences, but works nicely. Thanks again. | |
Graham 10-Jun-2007 [6631] | New error for me .. An error has occurred. If this occurred with an upgrade, please revert to the older version for the meantime, and report the error message as documented below. make object! [ code: 501 type: 'access id: 'not-open arg1: "Port" arg2: none arg3: none near: [repeat i p/cols [ line/pane/:i/offset/x: col-offset line/pane/:i/size/x: p/widths/:i - sizes/cell all [ p/pane/2/show? i = p/cols line/pane/:i/size/x: line/pane/:i/size/x + (p/size/x - p/pane/2/size/x - (line/pane/:i/offset/x + line/pane/:i/size/x)) ] line/pane/:i/text: replace/all form pick p/data index - 1 * cols + i "^/" "¶" line/pane/:i/font/color: either find p/options 'no-action [ black ] [ either find picked index [white] [black] ] col-offset: col-offset + pick widths i ]] where: 'confirm ] |
Ashley 10-Jun-2007 [6632] | Well, that looks like the face-iterator logic (used by table and text-list) ... any idea what was being done at the time (i.e. table just about to be displayed, row double-clicked on, etc)? |
Graham 10-Jun-2007 [6633] | None of those as I recall. |
Ashley 10-Jun-2007 [6634] | Build#95 uploaded to SVN. Contains new 'on keyword and request-char function. 'on is used to specify multiple action handlers at once, as in: display "" [ field field on [ scroll [print scroll/y] focus [print "Got here!"] ] ] %tour.r updated to demonstrate new request-char function. |
btiffin 12-Jun-2007 [6635] | Ashley; How hard would it be to allow set-path! for widget variables? Or am I missing something that would allow widget variables to be held in an object!? I'm fairly prone to missing things :) |
Ashley 12-Jun-2007 [6636] | You mean something like: b: "Bob" display "" [a: field b] which is already supported, or something else? |
btiffin 12-Jun-2007 [6637] | No I mean something like fields: make object! [ a: b: c: none ] display "Test" [fields/a: field fields/b: field fields/c: field] |
Ashley 13-Jun-2007 [6638x2] | No [to supporting that]. The preferred approach would be: obj: make object! [ a: "Bob" f: does [display "" [field b]] ] obj/f |
typo "field b" -> "field a" | |
btiffin 13-Jun-2007 [6640] | Thanks Ashley. |
Volker 13-Jun-2007 [6641] | Would pathes help? I think the change to support that could be small. |
btiffin 13-Jun-2007 [6642] | I was looking at (and don't grasp all the implications of) the parsing set-word! occurances and how a set-path! may be inserted. But...it looked too simple, so it had to be wrong. :) And again, I don't get all the implications, so I'm completely accepting of Ashley's nice short no. |
Graham 13-Jun-2007 [6643] | make object! [ code: 501 type: 'access id: 'not-open arg1: "Port" arg2: none arg3: none near: [line/pane/:i/font/color: either find p/options 'no-action] where: 'confirm ] |
Ashley 13-Jun-2007 [6644] | face-iterator init func as it tries to create a table ... now that one should be reproducable? |
Graham 13-Jun-2007 [6645x2] | I'm just logging errors here as they occur! |
so I can add traps around them and then log them to the rebgui.log | |
Ashley 14-Jun-2007 [6647] | Are these errors you're generating or your users are generating? I've got a dozen or so users who've been pounding away at a large RebGUI app for almost 2 years now, and the rebgui.log files on their PC's are pretty much empty. Might just be a case of YMMV ;) |
Graham 14-Jun-2007 [6648] | these are ones I am generating :( |
Anton 14-Jun-2007 [6649] | btiffin, maybe this works: fields: context [a: b: c: none] display "test" compose [(to-set-word in fields 'a) field (to-set-word in fields 'b) field] |
btiffin 14-Jun-2007 [6650] | Hey...that should get rid of a few more globals, cool. Thanks Ashley. First tests worked great. :) |
Ashley 14-Jun-2007 [6651] | Anton, very cool. I'll think I'll add that trick to the [RebGUI] cookbook. |
btiffin 15-Jun-2007 [6652] | Anton; Yep, thanks. This has opened up all kinds of RebGUI goodness. |
Pekr 15-Jun-2007 [6653] | well, but will it bind those variables to those one in 'fields object? |
Anton 15-Jun-2007 [6654x2] | Ah it works, good :) I couldn't remember if the binding was kept or not. |
Pekr, do you know what in fields 'a means ? | |
Pekr 15-Jun-2007 [6656x2] | yes, from the help .... |
I am just not sure, if the 'a in the 'display is the same as in the 'fields .... | |
Anton 15-Jun-2007 [6658] | Check this out: >> o1: context [a: 1] >> o2: context [a: 200] >> print probe compose [(in o1 'a) (in o2 'a)] [a a] 1 200 |
Pekr 15-Jun-2007 [6659] | I mean - does it create global 'a, referencing fields/a? |
Anton 15-Jun-2007 [6660] | The only concern for me was if to-set-word kept the binding. (I guess, possibly, long ago it did not.) |
Pekr 15-Jun-2007 [6661] | yes, but you are creating global var anyway, no? via the set-word? |
older newer | first last |