r3wp [groups: 83 posts: 189283]
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

World: r3wp

[!RebGUI] A lightweight alternative to VID

Graham
7-Jul-2008
[7598x3]
no widget .. it's all created on the fly
Basically it's tab-panels, panels, and buttons assembled as needed.
And all the ideas were taken from the MS silverlight medical demo
Pekr
7-Jul-2008
[7601]
aha ... I like collapsing/expanding capability. ...
Graham
7-Jul-2008
[7602x3]
It just regenerates the layout
and then I use tab-panel/replace-tab [ new layout ]
the MS demo expands in-situ which would be nice to do ... but I recreate 
the whole thing
BrettH
17-Jul-2008
[7605x2]
Anybody out there using RebGUI ?  I'm just starting to use REBOL 
and have delivered a small app using VID  to a volunteer group who 
are collecting local history articles. And I'd like feedback on any 
gotchas with RebGUI vrs VID. Thanks
Well ! There seems to be !! It took a very long time to display any 
messaged when I visited the group, so I though there wern't any :-) 
Cheers.
shadwolf
18-Jul-2008
[7607x3]
http://www.dobeash.com/rebgui.html-> docs etc...
to get rebGUI  you simply write those lines into a ".r" file or you 
go into the rebol/desktop in the REBOL/DEMOS folder
REBOL [Title: "RebGUI Demo"]

do http://www.dobeash.com/RebGUI/get-rebgui.r
do view-root/public/www.dobeash.com/RebGUI/tour.r
BrettH
18-Jul-2008
[7610x2]
I'm trying to do some 'field navigation' within a rebgui form and 
cannot figure out how to get teh filed cursor to 'goto field'
label "Publication : "   

  publication: field  100x8   font  [  size: 18 color: black  shadow: 
  none  ]
					on-unfocus [ uppercase publication/text 
							     ; I'd like to jump to "page" field here
							   ]
		label "Date :"     

  date: field  30x8  font  [  size: 18 color: black  shadow: none  
  ]
		
		label "Page: "  

  page: field  20x8  font  [  size: 18 color: black  shadow: none  
  ]
		return
Graham
18-Jul-2008
[7612]
how about  ... set-focus page true
BrettH
19-Jul-2008
[7613]
I've tried that, all i get is a stack error:  as soon as I press 
TAB to enter the on-focus , and the program aborts thus ** Internal 
Error: Stack overflow
** Where: unfocus

** Near: if all [face/type <> 'face get in face/action 'on-unfocus] 
[
    unless face/action/on-unfocus face [return false]
]
Graham
19-Jul-2008
[7614x2]
maybe it's because you're doing stuff which resets the focus back 
to the publication field?
this works 


do %rebgui.r

display "" [

label "Publication : "   

  publication: field  100x8   font  [  size: 18 color: black  shadow: 
  none  ]
					on-unfocus [ uppercase publication/text 
							     ; I'd like to jump to "page" field here
									
							   ]
		label "Date :"     

  date: field  30x8  font  [  size: 18 color: black  shadow: none  
  ]
		on-focus [ set-focus page false ]
		
		label "Page: "  

  page: field  20x8  font  [  size: 18 color: black  shadow: none  
  ]
		return
] do-events
BrettH
19-Jul-2008
[7616]
Mmm ! Your code sort of does the job, but your forcing the field 
Date to be skipped by it own on-focus trap
which would skip Date always,
what I'm trying to do is have Description

control the next field to 'visit' depending on what ever test I code 
in the on-unfocus
 attached to Description field.

for eg: ( pseudo code )

label "Publication : "

  publication: field  100x8   font  [  size: 18 color: black  shadow: 
  none  ]

  on-unfocus [ if desc-flag = 1 [ set-focus new-description ] [ set-focus 
  old-description ] ]

====

Your observation of 'reseting' focus back to Description field is 
an interesting one which I had not considered.
Graham
19-Jul-2008
[7617]
well, until Ashley tells us how to do it, you could hide a dummy 
field behind the date field to take the focus from the tab, and then 
make the decision from that.
BrettH
19-Jul-2008
[7618]
Now thats a interesting idea - bit of a kluge tho.


I'm a bit surprised that this 'obvious' programming need is causing 
a problem ! 


I can envisage many situations where a program needs to set the cursor 
focus upon any 

of the available fields displayed depending upon a fields content.
Graham
19-Jul-2008
[7619]
I'm guessing it's a bug ... set-focus is triggering an on-focus event 
and so your code keeps triggering causing a stack overflow.
BrettH
20-Jul-2008
[7620]
I think it might be the 'fact' that the on-unfocus never get to see 
its true/false return because my code wants to "go over there" before 
that happens, only Ashley can tell.
Ashley
20-Jul-2008
[7621]
Correct ... the set-focus "eats" the return state.


set-focus was intended more for use either within a display's do 
func or from outside the display. Tab order cannot be set programmatically, 
although it should be noted that tab order is the same as the widget 
specification order so you can at least sequence your widgets in 
the desired order. There is no easy way to conditionally skip widgets, 
although build#106 added the set-state func which lets you toggle 
a widget's info state. As for this being an "obvious" programming 
need, it depends on the type of GUIs you wish to write ... you are 
the first person in over two years to have hit this issue (or at 
least report it) ... although I'll freely admit that keyboard navigation 
is not RebGUI's strong point ;)
Graham
20-Jul-2008
[7622]
well, I have had a similar problem.  I have a drop-list with title 
in it followed by a radio-group with gender, followed by occupation. 
 I want the user to skip the radio-group which is set based upon 
the droplist value.  Eg. drop-list is "Mr." and so set the radio-group 
to "M" and then skip to occupation.
BrettH
20-Jul-2008
[7623]
While tab ordering is a useful feature, in this case I'm trying to 
tab order by testing field content, I'm surprised that its considered 
a bit unusual :-)  In my data entry program I want the user to be 
able to set the work flow somewhat. , ie: on mass data entry they 
should not have to tab over the row of function buttons I have arranged 
along the bottom of the form, but when they tab 'out' of the last 
data entry field, the program saves the data, clears the form, replaces 
some common data and then return to the first entry field -- all 
without using the mouse. Not true key board navigation but very pleasent 
for the user. The user uses teh mouse to get to the buttons. This 
I am currently doing using VID.  Graham's usage is a very typical 
form interaction senario, one I was soon to try !
Graham
20-Jul-2008
[7624x4]
I'm going to have to try my own suggestion!
what has to be done to make keyboard navigation stronger?
display "" [ edit-list data [ "Mr." "Mrs." "Dr." "Miss" ] return 
field ] do-events
click on anything BUT "Mrs." and the focus is gone somewhere .... 
dunno where!
Graham
21-Jul-2008
[7628]
and of course this is a major impediment to using the keyboard.  
So, for an edit/drop list you have to click twice - once to choose, 
and then once to regain the focus.
btiffin
8-Aug-2008
[7629]
2.7.6 Demo of RebGUI.  If you try the spinner, Ctrl-MouseWheel then 
later try Functions/Requestors request-ui it fails with
** Script Error: Invalid argument: $10.00
** Where: init
** Near: all [not empty? text data: to type? first options text]
para/margin/x: size/y
p:

Where the invalid argument is the same data as the last Ctrl-Mousewheel. 
 So it could be 9:00, 18:00, $10.00 etc.
I haven't tracked through any of the code yet, being a lazy git.
Graham
14-Aug-2008
[7630x2]
How to make the rows of a table accessible to the cursor keys without 
using the mouse to grab focus?
display "" [ t: table 20x60 options [ "code" left 1. ] data [ 1 2 
3 4 5 6] do [t/select-row 1 ]] do-events

but the cursor keys don't work until I click on a row.
Graham
15-Aug-2008
[7632x2]
Looks like you can tab out of a table, but not into one.
Because you can't tab to a table, a table blocks the tab sequence 
across a form.
Graham
16-Aug-2008
[7634]
Ashley, is there a way to simulate a mouse click on the first element 
of a table so that arrow navigation can then be activated?
Ashley
16-Aug-2008
[7635]
Yes, I think. Something like:

	a: context [double-click: false]
	display "" [table options ["c" left 1.] data [a b] do [
		t/pane/1/pane/1/line/feel/engage t/pane/1/pane/1/line 'down a
	]]
	do-events


but this is not quite there. The trick is to pass the correct face 
argument to the engage function of the face-iterator.
Graham
16-Aug-2008
[7636]
what we need is anamonitor for Rebgui!  :)
Pekr
28-Aug-2008
[7637x3]
Can RebGUI table or sheet style contain check boxes? I need small 
util, which will allow ppl to choose multiple items from the catalog 
at the same time.
I know it has multiple line selection, but it is rather primitive.
Where can I find more info about API changes of RebGUI, which happened 
some time ago? I would like to get Cyphre's grid working, as it is 
many times better than table available, even without column resizing 
....
shadwolf
28-Aug-2008
[7640x4]
Pekr I can give you a rebGUI table widget I done long ago that handles 
it ... -> http://shadwolf.free.fr/rebgui-list52.r
this file includes widget + sample
I didn't tested it with new version of rebgui but it should still 
work
this code is free to use  you can edit copy redistribute etc...
Pekr
28-Aug-2008
[7644x2]
Thanks, will try in the evening, once I am back from my work ..
is it supposed to work stand-alone? What do I need to run it?
shadwolf
28-Aug-2008
[7646]
rebgui installed
Pekr
28-Aug-2008
[7647]
yeah ... I mean - I run - do %rebgui.r, and then? do I have to construct 
'display, or does it contain runnable example?