• Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

AltME groups: search

Help · search scripts · search articles · search mailing list

results summary

worldhits
r4wp1023
r3wp10555
total:11578

results window for this page: [start: 8001 end: 8100]

world-name: r3wp

Group: !RebGUI ... A lightweight alternative to VID [web-public]
Ashley:
20-Jul-2008
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 ;)
Ashley:
16-Aug-2008
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.
Pekr:
28-Aug-2008
is it supposed to work stand-alone? What do I need to run it?
Pekr:
28-Aug-2008
yeah ... I mean - I run - do %rebgui.r, and then? do I have to construct 
'display, or does it contain runnable example?
Louis:
8-Sep-2008
What I want to do is populate the gui table with all the data in 
the SQLite projects table.
Louis:
8-Sep-2008
Is there an easy way to do that?
Robert:
8-Sep-2008
Louis, you need to do an: insert clear data-of-table your-data
Claude:
6-Oct-2008
hi, i have a problem with rebgui build 116 on table or field widget. 
i post a file here could some explain to me what append when i want 
to do a update of a row ......
Claude:
6-Oct-2008
REBOL[]


rebgui-build: %./rebgui-116/
rebdb-build:  %./RebDB-203/


#include %/home/ramcla/Documents/rebol/rebol-linux-sdk-276/source/gfx-colors.r

#include %/home/ramcla/Documents/rebol/rebol-linux-sdk-276/source/gfx-funcs.r
#include join rebgui-build %rebgui.r
#include join rebdb-build %db.r

do  join rebgui-build %rebgui.r
do  join rebdb-build %db.r

to-amount-text: func[
	data
	/local
	d
][
	d: to-string to-money (to-decimal data)

 return either d/1 = #"-" [join "-" (skip d index? find d #"$")][(skip 
 d index? find d #"$")]
]

table-exist?: func [
	table [string!]	
	/local
	w
][
	w: to-word table
	either error? err: try [db-describe :w][
		disarm err
		return false
	][
		return true
	]
]

create-table: func [
	table [string!]	
	/local
	w
	tables
][
	tables: [

  t_joueurs [id nom prenom date_naissance adresse code-postal commune 
  pays]
		t_periodes [id nom date-debut date-fin status]
		t_jeux [id period_id date lieu]
		t_resultats [jeux_id personne_id manche_1 manche_2 manche_3]

  t_resultat_historique [jeux_id personne_id manche_1 manche_2 manche_3]
	]
	
	w: to-word table
	db-create :w (select tables w)
]


create-db: func [
	/local
	table
][
	if not table-exist? table: "t_joueurs" [create-table table]
	if not table-exist? table: "t_periodes"  [create-table table]
	if not table-exist? table: "t_jeux"     [create-table table]

 if not table-exist? table: "t_resultats"     [create-table table]

 if not table-exist? table: "t_resultat_historique"     [create-table 
 table]
]

create-db

;print screen avec F3
ctx-rebgui/on-fkey/f3: make function! [face event] [
    save/png %screen.png to image! face
    browse %screen.png ; or call %screen.png
]


words: copy []

;	clear words in global context

query/clear system/words

;	show splash screen

splash join rebgui-build "images/logo.png"

;	compose pie-chart data

pie-data: compose [
	"Red" red 1
	"Red-Green" (red + green) 1
	"Green" green 1
	"Green-Blue" (green + blue) 1
	"Blue" blue 1
	"Blue-Red" (blue + red) 1
]



;	wrap display in a func so it can be called by request-ui


display/close rejoin ["Carte (build#" ctx-rebgui/build ")"] [
	

 ;	button "Configure Look & Feel" 50 [if request-ui [unview/all show-tour]]
	
	tight
	after 1
	menu #LW data [
		"Maintenance" [
			"Bienvenue"	[panel-master/select-tab 1]
			"Joueurs" 	[table_joueur 'rsh panel-master/select-tab 2]
			"Periodes" 	[panel-master/select-tab 3]
			"Jeux"		[panel-master/select-tab 4]
		]
		"Option" [
			"Quit"		[quit]
			"Print Screen"  [alert "coucou"]
		]
	]
	
	panel-master: tab-panel options [no-tabs] #LVHW data  [			
		"Bienvenue" [
			
			title-group %./images/setup.png data  "bienvenue" "toto"	
		]
		"Joueurs" [
			label "nom : "
			ask_nom: field 50 
			label "prénom :"
			ask_prenom: field 50
			button "Trouver"
			return
			maintenance_table_joueurs: table 200x50 #LW options [

				"id"                  left     .1
				"nom"                 left     .3
				"prenom"              left     .3
				"date de naissance"   center   .3				
			] data [] [table_joueur 'rtv]

			return
			label "ID :"  35 
			m_joueur_id: field  50 options[info] 
			return
			label "Nom :"  35
			m_joueur_nom: field  50
			label "Prénom :"  35
			m_joueur_prenom: field 
			return 
			label "Date de Naissance :"  35
			m_joueur_date_naissance: field  43 tip "coucou" on-unfocus [
				use[d][
					d: copy face/text
					either empty? d[
						set-text m_joueur_age ""
					][
					 	either error? err: try [to-date d][
							disarm err
							set-color face red
						][
							set-color face CTX-REBGUI/COLORS/page
							d: to-date d
							set-text m_joueur_age (now/year - d/year )
							set-text face to-date d
						]
					]
				]
				true
			]
			arrow [
				use[d][
					if not none? d: request-date[
						set-text m_joueur_date_naissance d
						set-text m_joueur_age (now/year - d/year)
					]
				]
			]
			label "Age :"  35 
			m_joueur_age: field  50 options [info]
			return
			label "Adresse :"  35 
			m_joueur_adresse: area  100x20 [print coucou]
			return
			label "Code Postal :"  35 
			m_joueur_code-postal: field  50
			label "Commune :"  35 
			m_joueur_commune: field 50 
			return
			label "Pays :"  35 
			m_joueur_pays: field 50
			return
			button "Ajouter" [table_joueur 'add]
			button "Refresh" [table_joueur 'rsh]
			button "Update" [table_joueur 'upd]
			button "Supprimer" [table_joueur 'rmv]
		]

		"periodes"[text "lolo"
		]
	
	"jeux"[
text "lolo"]
	] 
	
	message-area: area #LW "" 10x-1	

][question "Vraiement ?"]



table_joueur: func [
	act [word!]
][
	switch act[
		clr[
			clear maintenance_table_joueurs/data
			maintenance_table_joueurs/redraw
		]
		rsh[
			table_joueur 'clr

   insert tail maintenance_table_joueurs/data copy (db-select [id nom 
   prenom date_naissance ] t_joueurs)
			maintenance_table_joueurs/redraw
			probe 	maintenance_table_joueurs/rows
		]
		cmt[
			db-commit t_joueurs
			table_joueur 'rsh
		]
		rmv [
			probe compose[id = (to-integer m_joueur_id/text)]

   db-delete/where t_joueurs compose[id = (to-integer m_joueur_id/text)]
			table_joueur 'cmt
		]		
		add [
			db-insert t_joueurs 
			compose[
				next 
				(m_joueur_nom/text)
				(m_joueur_prenom/text)
				(to-date m_joueur_date_naissance/text)
				(m_joueur_adresse/text)
				(m_joueur_code-postal/text)
				(m_joueur_commune/text)
				(m_joueur_pays/text)
			]
			table_joueur 'cmt
		]
		upd [
			db-update/where t_joueurs 
			[nom prenom date_naissance adresse code-postal commune pays]
			compose [
				(m_joueur_nom/text)
				(m_joueur_prenom/text)
				(to-date m_joueur_date_naissance/text)
				(m_joueur_adresse/text)
				(m_joueur_code-postal/text)
				(m_joueur_commune/text) 
				(m_joueur_pays/text)
			]
			compose[id = (to-integer m_joueur_id/text)]
			table_joueur 'cmt
		]
		rtv[

   foreach [id nom prenom date_naissance adresse code-postal commune 
   pays] db-select/where * t_joueurs compose[id = (first maintenance_table_joueurs/selected)] 
   [
				probe maintenance_table_joueurs/selected
				set-text m_joueur_id id 
				set-text m_joueur_nom nom
				set-text m_joueur_prenom prenom
				set-text m_joueur_date_naissance date_naissance
				set-text m_joueur_age (now/year - date_naissance/year)
				set-text m_joueur_adresse adresse
				set-text m_joueur_code-postal code-postal
				set-text m_joueur_commune commune
				set-text m_joueur_pays pays								
			]
		]
	]
]



do-events
Claude:
6-Oct-2008
could you and would you explain to me wath append ? .............. 
i think the probleme is when a do a update on table  and selected 
an another row with the function table_joueur 'rtv
Claude:
6-Oct-2008
if you try to do an update of one row and after selected another 
row , the table willl not work any more correctly !!!!
Claude:
9-Oct-2008
i would like to know how a can do en print screen from a menu
Claude:
10-Oct-2008
have a look on my little test to do a application http://users.skynet.be/fc078613/carte.r
  you mus select in the menu "maintenace/joueurs" this is a CRUD 
like i think
Claude:
25-Oct-2008
Ashley can you give me a better way to do it ------------thank you
Claude:
26-Oct-2008
re  i find something to do it ;-)
Ashley:
5-Nov-2008
I've seen something similar before ... solution was to ensure all 
values were strings ... and to copy/deep the data block prior to 
passing it to the table widget. I think it has something to do with 
either a non-string value (e.g. a block) confusing things, or a shared 
series [value] being modified by soemthing other than the table widget.
Ashley:
7-Dec-2008
Map the CNTRL key to one of the freely assignable TabletPC buttons? 
How does he do it currently (e.g. in File Explorer)?
Pekr:
13-Jan-2009
How to easily set auto resizing, for simple scenario as - window, 
two group boxes, in each of them area. I try with various LVHW combinations, 
but can't it get working, group-boxes are overlapping with simple 
#HW:


display "just a try" [group-box "1" 100x50 #HW data [] group-box 
"2" 100x50 #HW data []] do-events
Kai:
18-Jan-2009
Ashley - how do I overcome this problem:  I need to reduce the record 
block prior to db-inserting it because it contains sub-blocks. I 
would like to use 'next inside for autoincs, however.....
Graham:
22-Jan-2009
So, what I need to do is make the F keys stick to a particular screen, 
rather than being global.
Graham:
22-Jan-2009
But that is what I am trying to do .. assign diferent ops based on 
the current screen.
Graham:
22-Jan-2009
hmm.. I didn't do that ... so I guess I just have to use the window 
title.
Pekr:
22-Jan-2009
With one of my apps, I used win32 wrapper to get-window-text function, 
and I set window's text title. Not sure you can change title when 
you select different tab? What about setting one global variable 
for such purpose, which you would set each time when entering new 
screen? Maybe lot's of work to do it now, as you have 300 screens 
already, but :-)
Graham:
22-Jan-2009
Didier, I'll have to look at Rebgui to see if it can do this .. but 
at present I can use the window text.
Pekr:
23-Jan-2009
Graham - there are some aproaches out there. Some apps choose some 
pre-app-run dialog box, which let's you select, where you want to 
go. I am not much comfort with it, e.g. Open Office 3.0 starts that 
way. Othere do use different aproch, e.g. - on the left side, you 
have icon-list element, which can be even tabbed. That defines your 
right pane content

http://www.megaleecher.net/uploads/spybot_search_and_destroy.jpg


You can have many icons, on many tabs, so many options of how to 
organise your content pane ....
Graham:
12-Feb-2009
We have arrow key navigation of tables.  How can we get the enter 
key to do the action?
Ashley:
29-Mar-2009
Pekr/Graham (re group-box resize overlap convo from 13-Jan) ... it's 
a limitation not a bug. The #H and #W directives assume they are 
by themselves in a given row/column.


Instead of ... unview/only face/parent-face/parent-face ... why not 
unview/ony find-window face
 ... performance over coding efficiency.  


Ashley hasn't been on line here since xmas eve ... is he on a rather 
extended holiday

 ... the GFC has forced me to allocate considerable resources elsewhere, 
 but I'm back for the time being.


button is blue. But with over effect, going to green (default?), 
and with press, going pink

 ... the over (theme light) and press (state light) colors are global. 
 118 fixes the problem whereby these states lost your original color 
 override.


We have arrow key navigation of tables.  How can we get the enter 
key to do the action?
 ... add 'table to behaviors/action-on-enter
Ashley:
29-Mar-2009
Both is good. That's a fairly simple change to tree.r ... if I find 
some time over the week I'll do it.
shadwolf:
6-Apr-2009
if you do a hudge work to have to redo it from scratch next week 
that's not fun
Ashley:
19-Apr-2009
Define "current face". We could certainly do sometjhing like:

	display/relative-to face 20x20
Graham:
23-Apr-2009
Must be something to do with double click somehow ...
Ashley:
23-Apr-2009
I'd still like to understand and fix the base problem ... what do 
you mean by changing a function to a closure?
Graham:
23-Apr-2009
As I mentioned above, it is something to do with rebgui's double 
click handler.
Graham:
24-Apr-2009
Ashley, why is double click here producing two windows?

do %/c/rebgui9/rebgui/rebgui.r

nw: func [ ][

 view/new/offset layout compose [ label text (form now/precise) ] 
 to-pair reduce [ random 400 random 400 ]
]

display "Double Click Test" [
	table 40x40 options [ "Dbl Click me" left .9 ] data [ "one" ] 
	on-click [ nw ]
	on-dbl-click [ ]
]

do-events
Graham:
24-Apr-2009
this illustrates the problem.


do %/c/rebgui9/rebgui/rebgui.r
do http://www.fm.tul.cz/~ladislav/rebol/default.r
do http://www.fm.tul.cz/~ladislav/rebol/closure.r

nw: func [ /local lab ][
	view/new/offset layout compose [
		below 
		lab: text (form now/precise)
		button "show" [ probe lab/text ]  
	] to-pair reduce [ random 400 random 400 ]
]

nw2: closure [ /local lab ][
	view/new/offset layout compose [
		below 
		lab: text (form now/precise)
		button "show" [ probe lab/text ]  
	] to-pair reduce [ random 400 random 400 ]
] 

display "Double Click Test" [

 table 40x40 options [ "Func Dbl Click me" left .9 ] data [ "one" 
 ] 
	on-click [ nw ]
	on-dbl-click [ ]

 table 40x40 options [ "Closure Dbl Click me" left .9 ] data [ "two" 
 ] 
	on-click [ nw2 ]
	on-dbl-click [ ]
]

do-events
Graham:
24-Apr-2009
If you use the left hand table, and do a double click, then the "show" 
button will produce the same output in both windows.  Change it to 
a closure on the right hand table, and the "show" button now works 
correctly.
Pekr:
10-May-2009
I am trying to adapt Cyphre's old grid to recent RebGUI requirements. 
I got myself past color adaptation, so actually I can get it displayed, 
internally it returns correctly API function results, but I need 
to adapt to event handling. I am facing two problems:

- editing, double-click etc do not work
- during some actions as resizing I get following error:

** Script Error: action has no refinement called on-click
** Where: set-data
** Near: face/action/on-click face


I looked into: help ctx-rebgui/widgets/grid/action, but those funcs 
are not set. Is there any need to set those function for particular 
widget? I looked at some other styles as e.g. button, but button 
is not using its face/action/on-click either, so I am a bit confused 
....
Pekr:
10-May-2009
I do understand your point of view, which is - you try to keep Rebgui 
to its original idea. But - VID styleset is not real alternative 
to R2 GUI navadays, so refusing more complex widgets, especially 
in the case where noone really pushes anyone to use them, is escaping 
my understanding.
Graham:
20-May-2009
Do you need access to geekisp.com ?  I got an email from Jaime yesterday 
and could ask him ...
Louis:
30-May-2009
The problem I have with GUI programming is that I don't know how 
to find bugs.  How do you guys do it?
Reichart:
19-Jun-2009
Why do you no longer have access to it?
Ashley:
22-Jun-2009
Uploaded build 121 with a completely rewritten tabbing system. Tabbing 
into/out of tables and text-lists is now supported (you need to copy 
new behavior/tabbed and behavior/cyclic values across into %ui.dat). 
Will add remaining widgets next build plus ability to exit a cyclic 
widget (e.g. press a key to exit a group-box). What keystroke/combo 
do folks want to map the later functionality to?
Ashley:
22-Jun-2009
Yes, but make sure you use the updated versions of both %ctx-rebgui-edit.r 
and %set-focus.r. I've also uploaded build 122 to correct a typo 
in back-field.


With regards to the question as to "what key should escape from cyclic", 
I've come to the conclusion that the best way of handling this is 
to just "tab through" cyclic widgets, so:

	f1: field
	panel data [f2: field f3: field]
	f4: field

would tab as f1, f2, f3, f4, f1, etc. tab-panel would operate as:

	f1: field

 tab-panel data ["a" [f2: field f3: field] "b" [f4: field f5: field]]
	f6: field

with a tab sequence of f1, f2, f3, f4, f5, f6, f1, etc


This way we don't have to worry about what keystrokes to change tabs 
or exit grouping widgets. What do you think?
Ashley:
30-Jul-2009
But if you're asking them to select an option and the option display 
text is the same how do they know which to select? And if it doesn't 
matter then why the need to display multiple options with the same 
display text in the first place?
Graham:
30-Jul-2009
well, symbol is not usable across platforms as it depends on the 
fonts ... but I do use it beside a field to indicate a lookup widget 
is available
Ashley:
31-Jul-2009
changed from single color web like look to some W9x look, was there 
any reason?
 ... commercial reality ;)
where would I have changed the font?
 ... ctx-rebgui/effects/font
request-char somehow misbehaves here
 ... bug, noted
fonts must be handled differently in w7s

 ... I don't have access to W7 at home, but will check this Monday 
 at work
where do I set my UI options?

 Design time with ctx-rebgui/effects, /colors /behaviors and /sizes

 Adding request-ui back so you can alter these values from a GUI is 
 trivial ... what I've removed is the rebind logic that enabled you 
 to dynamically change values (i.e. you would have to re-do %rebgui.r 
 to see any UI changes take effect ... not very practical for an SDK 
 app)
they look like W9x

 ... the color scheme (with the colors/page change noted above) is 
 taken straight from W7
don't like gradiented buttons/tab
 ... based on W7 and Mac
I thought Ashley wanted to go more web way, not desktop app way

 ... I've actually gone for something halfway (simpler than OS, more 
 complex than Web)
is it using a smaller font?

 ... 12pt by default as always (maybe W7 renders it differently than 
 XP?)
everything seems much smaller
 ... bigger screen? ;)
I would welcome tour.r would fit 1280x800 notebook

 ... RC1 is about getting the basic functionality right, %tour.r and 
 %RebDOC.r will both be made to run 1024x768
used to fit
 ... they havn't been reworked yet
Windows XP with 1366 x 768 ...
 ... will be fixed with above
Ashley:
1-Aug-2009
Build 202 uploaded ( https://rebgui.svn.codeplex.com/svn/)
- Fixed password
- Added icon to tour.r
- Resized tour.r to fit smaller screens

- Reworked layout and display functions to remove duplicate show 
and do-events calls
- Removed do-events from tour.r and RebDOC.r


The layout/display change (apart from correcting numerous rendering 
anomolies and improving layout speed) may have caused other unforseen 
side-effects. At the very least it changes RebGUI in the following 
manner; previously you would write:

	display "A" [...]
	print "A"
	do-events

and get "A"  printed to the console. Now you write:

	display "A" [...]
	print "A"


and only get "A" printed to the console once the display has been 
closed. This now lets you write code like:

	display "A" [ ;do some stuff to set result]
	process result and display "B" or "C" based on result

This change is still experimental so let me know what you think.


Also, who actually uses tool-tips??? I've been debating whether to 
fix them so they work properly, or just remove them entirely. Thoughts?
marek:
3-Aug-2009
About my previous musing...

stack overflow return

 ... This is my fault as I  put ctx-rebgui/behaviors/tabbed: [... 
 (no table in)] in my little program. Need another safe way to do 
 that.
one can only select one table at a time
 ... not tabbable table is the only way
hidden column
 ... will use 0.01
button width

 ... basically when one specify [button 100] one get old [button 103] 
 but that's ok if we know it.
Ashley:
5-Aug-2009
A small example of using the new request-error function to handle 
errors in a user-friendly fashion:

	do %rebgui.r
	if error? set/any 'err try [
		display "Main" [
			button 100x50 "Sub" [
				display "Sub" [button 50x25 "Error" [1 / 0]]
			]
		]
	]  [request-error err]
Ashley:
5-Aug-2009
I've reverted the wait [] (do-events) behaviour back to what it was 
prior to build#203 ... so the logic is:

RebGUI v1
	display
		show face
		do-events
		attach window feel
		show face
		if dialog do-events
	do-events

RebGUI v2
	display
		attach window feel
		show face
		if dialog do-events
	do-events

which means the sample code above should now be written as:

	do %rebgui.r
	display "Main" [
		button 100x50 "Sub" [
			display "Sub" [button 50x25 "Error" [1 / 0]]
		]
	]
	if error? set/any 'err try [wait []] [request-error err]


In fact, that last idiom (wrapping the main event loop around a 'try 
/ request-error) is so basic I think I'll redfine it as a self-contained 
func (redefine do-events?).
Ashley:
6-Aug-2009
Build 205
- Added request-list
- Added request-email
- Added do-events
- Updated request-spellcheck (added image)
- Updated request-error
- Updated request-value
- Label size now defaults to 25x5 (was -1x5)
- Replaced "attempt" logic tests with "error? try"
- Memory footprint drastically reduced
- Added no-wait to display func
- Updated request-progress to use display/dialog/no-wait
- Fixed button over state bug
- Fixed slider jerkiness
Pekr:
10-Aug-2009
Now I do seem to understand, what still feels kind of wrong with 
scroller:


- normally, scroller has arrows. One arrow press scrolls data upon 
some number of items

- in regards to above, when you click anywhere else on the scroller, 
it should not jump directly under the mouse pointer, but only once 
again it should move by defined amount of data


... and it is not the case with our scroller. I should note that 
the "wrong feel" is just of a cosmetic nature, nothing annoying ...
marek:
15-Aug-2009
I always have little problem with tabbing over fields.

>> [field [if bad-input [do-something set-focus face] field] ;;; 
 triggering by <TAB> gives  focus to wrong field

Should I use on-key instead of default event block with check for 
#"^M"?

Should field behavior to be changed to be like button - action triggered 
only by <Enter>, <TAB> only moves focus - or should it stay as it 
is, Ashley?
Pekr:
24-Aug-2009
Going to test tour.r :-) btw - when do you plan to fix pop-ups (menu) 
mouse-over disappearance?
Graham:
25-Aug-2009
above is a result of trying to mix vid and rebgui in the same script 
.. can no longer do this.
Pekr:
25-Aug-2009
hence no further ability to mix VID with RebGUI. I am not sure Ashley 
did not oversimplified it :-) Because - there was a promise of "much 
lower" memory requirements, but the opposite is true, even if RebGUI 
gets optimised. Older version consumed some 11600 memory, new versions 
do consume over 12megs ...
Ashley:
25-Aug-2009
Any suggestions for a replacement for the VID toggle?

 ... isn't the toggle just a drop-list less the drop component? It's 
 a fairly trivial widget to add to RebGUI, but it's not a widget I've 
 seen in any Windows or Mac apps. What do folks think about this widget 
 from a UI POV?
Graham:
25-Aug-2009
Shame about breaking vid compatibility .. there were somethings I 
could not do in rebgui so I would switch to using ViD in the same 
application.
Graham:
25-Aug-2009
For instance I use VID to do a print preview ... using a draw dialect. 
 Never tried it with rebgui
Ashley:
25-Aug-2009
there were somethings I could not do in rebgui so I would switch 
to using ViD in the same application

 ... there shouldn't be any. Both VID are RebGUI are just "face factories" 
 ... feed them a spec and they produce a face object. All other functionality 
 is neither VID nor RebGUI specific. I get a lot of emails asking 
 "how do I do x in RebGUI", but 99% of them are really "how do I do 
 x in REBOL", or, "how do I use the SDK to do x" type questions.

I use VID to do a print preview ... using a draw dialect

 ...RebGUI's use of the effect facet (and hence draw) is no different 
 to VID's. Also note that 'draw is available as a native from the 
 console (i.e. you don't event need VID or RebGUI to use it).
Ashley:
25-Aug-2009
what's wrong with set-state [ block of widgets to disable ] 
 ... do you really mean set-disable and set-enable?
Pekr:
26-Aug-2009
- editor (and not only editor) - I can see that when hilighting, 
REBOL is not doing it all that correctly. Try to open editor, type 
in few lines (or just paste some text in there), and then try to 
mouse hilite. It works, but stops to hilite, when you move your mouse 
out of current window region. It should work even outside, at least 
it is what OS does. Open Notepad to compare ... it should not be 
difficult to do, and would improve usability ...
Pekr:
26-Aug-2009
Ashle - changed your code above to allow disable. Try pressing first 
button twice. It crashes RebGUI:

do %rebgui.r

display "Sample" [
	field
	f: field

 button [set-text second in-widget face/parent-face 'field "Hello" 
 disable f]
	toggle green data ["A" "B"] [print face/data]
	toggle data ["AA" "BB"] options [on] [print face/data]
]

do-events
Maarten:
28-Aug-2009
Ashley, how do I set focus to a button when I hit enter in a field?
marek:
7-Sep-2009
There are at least 3 problems needing fixing in 214 (and 213) version.


When using drop-list or edit-list if one will hit <TAB> button when 
list line is hilighted stack overflow eventuates. One, of course, 
doesn't need to do that, but it may happen.


Slider button, as presented in RebDOC, bombes out for simple reason. 
Formula used is [slider] but minimum required seems to be [slider 
[]] - compulsory action needed.


In RebDOC editor requestor hitting "Open" or "Save" button triggers 
feature-na script error.
marek:
15-Sep-2009
There is strange bug introduced in build 208 and still there. I checked 
and 207 seems to be OK.


When tabbing table and edit-list, edit-list becomes not accessible 
when first line of table gets selected. Selecting any other table 
line clears the problem.
I'm on linux Mint. Can anybody confirm my findings?
 

>>display "" [edit-list data [] table options ["a" left 1.0] data 
[1 2 3]] do-events  ;-- tab a bit, please
marek:
17-Sep-2009
Thanks Graham for confirming. Thanks Ashley for quick fix of the 
last problem.

Problem I tried to explain before still remains. Lets explain it 
better, if I can.


>>display "test" [table options ["a" left 1.0] data [11 22 33] field 
edit-list data [1 2 3] field] do-events

If one selects first line in table and tries to <TAB> around one 
gets stack on edit-list (drop-list too).

If, on the other hand, one selects any other line of table, edit-list 
gets focus and tabbing continue to work, but only after it reaches 
table again.
I hope it's not too hard to fix. Thanks.
marek:
17-Sep-2009
I will try my luck again with this 2 items.


When using edit-list or drop-list, there is a way to crash it. Just 
click on the widget, hilight any line on the list and press <TAB>.

>>display "" [edit-list data [1 2]] do-events ;;-> stack-overflow 
error message pops up.


Table widget has different gap in the last column on the right without 
and with the scroller. It' only cosmetic thing and maybe it is customary 
to be like that.

>> display "" [table options ["a" right 1.0] data [1] table options 
["b" right 1.0] data [2 3 4 5 6]] do-events

Can anyone confirm, please. Ashley?
marek:
19-Sep-2009
Another stumble block in my slow attempt to write my little program. 

Try to select edit-list and hit enter key.

>> display "" [table options ["a" left 1.0] data [] edit-list []] 
do-events ;-- works as it should

>> display/dialog [table options ["a" left 1.0] data [] edit-list 
[]] ;-- window disappears

It maybe related to the table problem I mentioned before.
marek:
23-Sep-2009
One more test to help with debugging. It works with build 207. It 
stops working with buid 208. At least for me.


>>display "" [field table options ["a" left 1.0] data [1] field] 
do-events


Click on field and try to tab around. You can't even select any field 
any more (208). Using empty table is even worse. With 2 rows at least 
it works, but one may need to grow table gradually.
Bobik:
4-Oct-2009
Hi Ashley, i would like ask you how to make new widget after you 
have removed function append-widget. I have not found any function 
to do it... sorry i am a dommies and may be there similar func exists 
 :-)
Bobik:
6-Oct-2009
I know - VID method engage has EVENT, where can i get event/offset...... 
so how to get such value in rebgui to avoid do new widget :-) ?
Ashley:
7-Oct-2009
In VID you specify the feel directly, in RebGUI you let the widget 
worry about these low-level implementation details. None of the default 
widgets need to pass mouse offsets back to the application, so if 
you need to do this then creating a new widget is the way to go. 
Having said that, I could always add another action handler (on-anything 
face action event) which would fire instead of the above case statement 
(i.e. handle the event as in VID or let RebGUI delegate it to the 
appropriate handler).
Pekr:
14-Oct-2009
As append-widget removal was oversimplification imo, especially for 
the widget authors, I created short script, which kind of automates 
the process ....

1) Save the script, e.g. make.r, into the RebGUI root dir

2) create one file, called %my-widget-list.r, containing unnamed 
block, containing file-names. Your widgets can be placed anywhere

3) create backup of %rebgui-widgets.r, call it %rebgui-widgets.old.r, 
in order to be able to easily "remove"  widgets by commenting them 
out in file 2)

Here's the script:
REBOL []

;--- to enable removal of unwanted own widgets, create
;--- copy of rebgui-widgets.r into rebgui-widgets.old.r

;--- remember to do so, when official distro release contains new 
widgets!
if exists? %rebgui-widgets.old.r [
  write %rebgui-widgets.r read %rebgui-widgets.old.r
]

;--- load list of widgets you want to include
;--- file containing un-named block of list of files to include
widgets-to-include: load %my-widget-list.r

template: "^-#include %widgets/^/"

;--- read RebGUI widget list (%rebgui-widgets.r)
tmp: read %rebgui-widgets.r

widget-buffer: copy "^/"

foreach widget-filepath widgets-to-include [ 

   widget: last split-path widget-filepath

   ;--- copy widget to the widget-directory
   write join %widgets/ widget read widget-filepath
  
   ;--- build string containing widget names you want to add ...

   ;--- but only when not already on the list - prevent duplicate entries
   if not found? find tmp widget [

        append widget-buffer (head insert find/tail copy template "/" widget)
   ]

]

;--- append to RebGUI widget-list (%rebgui-widgets.r)
change back back tail tmp (append widget-buffer "]")
write %rebgui-widgets.r tmp

;--- rebuild RebGUI distribution ...
call "create-distribution.r"
shadwolf:
19-Oct-2009
ok but with new vid  in R3  what will be the future of rebgui ? ashley 
do you plan to keep rebgui as an enhancement and laboratory ground 
for new kind of widgets design in the new VID ? Or does the new VID 
will kill  rebgui ? What will be the link betwin R3/VID and rebgui 
do you think some of the fun widgets from rebgui will be adapted 
by default in R3/VID ?


If you remmeber i asked this like 1 year ago to carl and didn't get 
any reply...
Ashley:
22-Oct-2009
re: RebGUI and R3/VID. I'll probably put something up on my website 
on this topic as I get asked this quite a lot. Basic thinking at 
this stage is:

	I need to create SDK GUI apps for Windows and OSX
	R2/RebGUI is the only practical alternative at present for *me*
	I'd love to use R3/VID to create SDK GUI apps today
	This probably won't be possible for quite some time

 If and when this *is* possible I'll port all my apps over to R3/VID

 To do this I'll either create a compatibility layer that lets RebGUI 
 apps run on R3/VID, or

 Write a conversion script that tries to convert (if possible) RebGUI 
 scripts to R3/VID

 I'd hope R3/VID is complete enough that it doesn't require any of 
 RebGUI's basic widgets!
Graham:
2-Jan-2010
how to set the check-group ?


display "" [ cg: check-group data [ "1" none "2" none "3" none ] 
button "Set" [ set-data cg [ true true true ] probe cg/data] ] do-events

doesn't work for me
Graham:
3-Jan-2010
I often have the need to set a date on a field ... and use a symbol 
to invoke the request-date .. .but this usually means I have to name 
the date field like this


datefld: field 25 symbol data 'look on-click [ use [d][ if d: request-date 
[ set-text datefld form d ]]]


To avoid naming the datefield, I have this function which returns 
the prior face


get-prior-widget: func [ f
    /local pane priorface
][
    pane: f/parent-face/pane
    priorface: pick pane -1 + index? find pane f
]

and here's a request date that uses it


request-date-priorface: func [ f /local d ]
[
    if d: request-date [
        set-text get-prior-widget f form d
    ]
]

so we can now do:


 field 25 symbol data 'look on-click [  request-date-priorface face 
 ]
Graham:
3-Jan-2010
And this doesn't seem to work either


>> display "" [ gb: group-box -1x-1 data [ t: table "test" options 
[ "a" left 1 ] data [ 1 2 3 ]] return button "Get" [ probe get-values 
gb ]] do-events
[[]]
jack-ort:
24-Feb-2010
Hi!  maybe I should ask this in the "I'm New" group.  Wanted to try 
out RebGUI for my 2nd REBOL project.  I'm stuck early on trying to 
refresh a table based on a SQL query in a parent window when closing 
a child window that would have added a record to table.  I've gotten 
the examples on click and away events to work, but do not understand 
how to use focus events apparently.  Can someone point me to some 
sample code that would help w/ moving focus from window to window 
and refreshing tables?  With that, I think most of my GUI problems 
would be solved. 

TIA!  -Jack
jack-ort:
25-Feb-2010
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.
Ashley:
26-Feb-2010
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).
Henrik:
10-Mar-2010
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
BudzinskiC:
16-Apr-2010
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?
BudzinskiC:
16-Apr-2010
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..?
Claude:
9-May-2010
thanks Ashley,   do you find a way to correct Build 218 and drop-list, 
menu etc....    ?
Thorsten:
22-May-2010
I want to give Rebgui a try for an app i need to do. So, i need a 
tree in there, which should be filled from database request  when 
the app starts. Not via button click.  Can anybody give me a small 
example how to achive this. Searched the docs, but couldn't find 
something like that.  And be kind with me as i am not too familiar 
with Rebgui till now. I downloaded build 218. What i tried so far 
is set-data via button, but that doesn't seem to work.  A sample 
would drastically shorten my way to get this working. Thanks in Advance!!
Thorsten:
23-May-2010
Are there any plans to update the widget in the near future or do 
you have other priorities?? Can you tell me which of the widgets 
already have these accessors, to have a look at??
Pekr:
23-May-2010
Ashley - what is your status re RebGUI and its future? It seems to 
me, that R2 brach is not going to be further developed? And also 
- I noticed you mentioned some flawor of even more simplified RebGUI 
like engine for R3. Is this still a plan, or do you wait for how 
R3 VID emerges?
Ashley:
23-May-2010
what is your status re RebGUI and its future?

 ... RebGUI does most of what *I* need it to do at present, but I'd 
 really prefer to be using R3 + SDK + Cool looking R3 GUI. I'm experimenting 
 with a minimalist GOB-based R3 GUI, but it's more an intellectual 
 pursuit to see how minamalist (and functional) I can get it ... so 
 don't hold your breath.
Graham:
16-Aug-2010
In 117, you can't seem to tab into a table eg.
 

 display "" [ field field table options ["column" left 1.] data [ 
 "ab" "cd" ]] do-events


but you can in the svn version .. what change has to be made to allow 
this?
Anton:
27-Aug-2010
You could probably modify the RebGUI sources so it doesn't do that, 
or ~maybe~ redefine the VID functions yourself (I think more challenging). 
Every time there is a RebGUI update, you'd have to remodify the RebGUI 
sources, so I wouldn't be inclined to do that myself. It depends 
how badly you want them to coexist.
Graham:
14-Sep-2010
Ashley, given that the last code changes to RebGUi were a year ago 
.. waiting for R3GUI to appear, do you still feel that there is no 
point in improving/fixing RebGUI?
Maxim:
17-Sep-2010
in view (not VID) you need to do a show on a face for its parent-face 
to be updated.  but the face must be actually visible IIRC.
Maxim:
17-Sep-2010
actually, I meant to say that you need to do a show on the *parent* 
for the child's parent-face to be refreshed
Ashley:
17-Sep-2010
Give it the widget's face and no matter how deeply embedded the widget 
the "window" it is in will be closed. Avoids having to do unview/only 
face/parent-face/parent-face type operations.
Anton:
18-Sep-2010
Gabriele is correct. PARENT-FACE is not set by LAYOUT, it is set 
by SHOW. I wrote some code which needed to know the parent-face before 
SHOW was used, so I did something like initialize the PARENT-FACE 
of every face in the face hierarchy myself.
I wanted LAYOUT to do this by default.
Graham:
18-Sep-2010
Would it be easy to patch layout to do this?
Graham:
28-Sep-2010
display "" [ bt: button "Test"  button "Set color" [ set-color/no-show 
bt green probe bt/color ] button "Set Color2" [ set-color bt red 
probe bt/color]] do-events


so we can see that the bt/color is set to the right color, 'show 
is then called and bt/color is then set to none :(
GrahamC:
28-Nov-2010
Is there a way to monitor all events ?  In vid you can do 'insert-event-func 
but in Rebgui we have this system/view/screen-face/feel: none	; kill 
global events system (used by 'insert-event-func)
8001 / 1157812345...7980[81] 8283...112113114115116