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

World: r3wp

[!RebGUI] A lightweight alternative to VID

Robert
1-Apr-2006
[3219]
IIRC the used words for reference of GUI widgets are global words.
Volker
1-Apr-2006
[3220]
Even if you bind them somewhere else?
Robert
1-Apr-2006
[3221x2]
But than I need to write a special bind block too. That's double 
work. Once in the GUI code, once in the bind block.
layout [
	name: field
	surname: field
	... hundred more ...
]
Volker
1-Apr-2006
[3223x2]
my-layout[
 part1[ name: field surname: field]
 second-hundred[ name: field .. ]
]
->

 part1: context[name: surname: none lay: [name: field surname: field]
append lay part1/lay
..
?
Robert
1-Apr-2006
[3225x2]
Hmm... This will than need some path notation to get there. This 
leads to database column names like: part1_name etc.
I thin I will go for an abstract solution and just use:
g001
g002
...
g100

and keep the mapping somewhere else.
Volker
1-Apr-2006
[3227x2]
would be real path-notation, part1/name
hundreds of different fields(layout-wise), or a table with lots of 
rows?
Robert
1-Apr-2006
[3229]
?? Sorry don't understand.
Volker
1-Apr-2006
[3230x2]
with lots of rows you can use the same layout-code over and over, 
only bound to different contexts.
and store contexts in blocks. instead of creating lots of artificial 
words for names
Normand
1-Apr-2006
[3232]
Can some one tell me why the path value of face/picked is sometimes 
valid sometimes invalid ? The last call is invalid but the precedings 
are valid.  prospect-table: table 120x40  #HW options ["ID" left 
.1 "Date M-à-J" left .22 "Nom" left .34 "Prenom" left .34] data (current-list) 
[
			show-text this-text pick face/data first face/picked 
			print "" print face/data print face/picked
			print (type? face/picked)

   ; ** Script Error: Invalid path value: picked ]; I want to use face/picked 
   in a formula to change the index to the pick function.
Thør
1-Apr-2006
[3233x3]
.
.
.
Ashley
1-Apr-2006
[3236x2]
Robert:
	1) global words: they are not. Try the following:


  f: has [v] [display "Test" [v: field button [unview halt]] do-events]


 My normal approach is to wrap each display in its own function with 
 something like:


  display-account-summary: make function! [id [integer!] /local f1 
  f2 f3 f4 f5 f6] [
			...
			display "Account" [
				f1: field
				f2: field
				...
			]
			...
		]


 2) tab-panel: works, just take a look at how it is used in %tour.r. 
 Note that it defaults to "size: -1x-1". Maybe you need to make the 
 panel contents bigger?
face/picked: try adding a "print mold face/picked" to the table action 
so you can see what block value(s) are being selected. Perhaps, in 
a particular case, it is returning an empty block?
Graham
1-Apr-2006
[3238x2]
Does image still only take a filename and not an image type?
I'm looking at capturing images from a web cam and inserting them 
into my program.
Ashley
1-Apr-2006
[3240]
The following works:

	a: load my-image.png
	display "Test" compose [image (a)]
Graham
1-Apr-2006
[3241]
Ahh .. forgot needed to compose.
Thør
2-Apr-2006
[3242x6]
Sorry for the proliferation of my dots, I'm forcing a resync and 
I'm being disconnected at about 25%... :-(
.
.
.
.
.
Graham
2-Apr-2006
[3248]
Have you considered broadband ?
Robert
2-Apr-2006
[3249]
Ashley: Do you use several display functions in your apps? At the 
moment I have one. I use tab-panels a lot. Hence I have one big display 
function.
Ashley
2-Apr-2006
[3250]
Have about half a dozen, and I make use of 'unview-keep to only have 
2 or 3 open at the same time (also useful when multiple data entry 
screens are open at the same time and the user clicks "commit" ... 
data is saved and all windows except the Main Menu are closed).
Robert
2-Apr-2006
[3251x2]
Ok, I think I have to make some tests.
Next one: What's the best way to create "user-selection-dependent-layouts"? 
For example the User select one entry in a drop-down box and depending 
on the value, a different layout should be shown below the drop-list.
Anton
2-Apr-2006
[3253x2]
Hmm.. you can do it many ways. What's the application to do and what 
will the window layout have in it ?
Oh... probably you would use tab-panel.
Robert
2-Apr-2006
[3255]
Yes, it's in a tab-panel and depending on the selection of one drop-list 
the data-input form that follows the drop-list has to display different 
labes & fields.
Anton
2-Apr-2006
[3256x3]
How many entries has the drop-list ?  Because if it's small I might 
suggest using another tab-panel. Otherwise I would try to create 
the layout for each selection before the window is displayed.
Or, if most of the time the labels and fields are common, but with 
some differences, I might use the drop-list action to hide all and 
show only those fields which go with the current selection.
ie. all the fields are placed in the same panel :)
Robert
2-Apr-2006
[3259x2]
Tab panels can't be used, because it's XOR. So either show A or B.
Doing a hidden layout and than plugging it into the current one would 
be best. But than I have to deal with PANE etc. IMO that's to low-level. 
I would like to have a way to alter the layout dynamically.
Normand
2-Apr-2006
[3261x2]
Ashley, thanks for the answers.   I cant figure out from the tour 
how to show some new values of data in a table.  What is wrong with 
the instructions in the two buttons.
Rebol []
#include %rebgui.r
unless value? 'ctx-rebgui [do %rebgui.r]

display "ProspectGUI" compose/deep/only [

 ex-table: table 120x40  #HW options ["ID" left .2 "Nom" left .4 "Prenom" 
 left .4] data [1 "Vac" "Gus"] []

 button "Delete1" [ ex-table/data: [2 "Cah" "Sug"] ex-table/redraw 
 ]

 button "Delete2" [ show-data ex-table [2 "Cah" "Sug"] ex-table/redraw 
 show ex-table]
]
do-events
Graham
3-Apr-2006
[3263x3]
try working with the existing data, and not creating new lists.
insert head clear ex-table/data  [2 "Cah" "Sug"]
ex-table/redraw
when I was tabbing .. got this

** Script Error: Cannot use path on none! value
** Where: next-field
** Near: all [
    item: find face/parent-face/pane face
    while [
        if tail? item: next item [item: head item]
       ...
Robert
3-Apr-2006
[3266x2]
Ashley, what's the state for the load/save OPTION implementation 
into RebGUI? Did you start already? If not, let me know. That's something 
I want to push forward.
load/save: I mean get back/fill in all fields in a structured way 
so that it can be used with SQLite.
Graham
3-Apr-2006
[3268]
what do you mean by this?