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

World: r3wp

[!RebGUI] A lightweight alternative to VID

Claude
7-Oct-2008
[7771]
and a another one it seem that in linux system the widget calendar 
do not have a good arrow for select year and month look this print 
screen => http://users.skynet.be/fc078613/images/screen.png
Graham
7-Oct-2008
[7772x2]
the arrows use a symbol font so you need to find the equivalent in 
Linux.
As I mentioned above, set-text only takes a string .. so you need 
to form dates, and numbers before using it.
Claude
7-Oct-2008
[7774x3]
hi, i retry to modifiy all my set-text by  set-text face form data 
but i have again the same probleme   if you want to try go to http://users.skynet.be/fc078613/carte.rip
or perharps it will by better to give all of  us a example of best 
praticies to use reb-db table and rebgui  ????? :-)
an example of CRUD will be very  good  ;-)
Graham
7-Oct-2008
[7777]
I've never used reb-db
Claude
7-Oct-2008
[7778]
perpharps Ashley can do it for us ................... please !!!!!
Claude
9-Oct-2008
[7779x8]
hi, i continu to progress with my prog
i would like to know how a can do en print screen from a menu
i find this one in docuement of rebgui
;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
]
but i would like to use it form a menu
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"  [print "do a print screen" ]
		]
	]
any hlep please
help
Ashley
10-Oct-2008
[7787x3]
m: menu ...
	...
	"Option" [
		...
		"Print Screen" [save/png %screen.png to image! m/parent-face]
	]
]
an example of CRUD will be very  good

REBOL []





do %db.r

do %rebgui.r




display "RebDB Test" [
	button "Create" [
		db-create my-table [ID Date]
	]
	button "Insert" [
		db-insert my-table reduce ['next now/date]
	]
	button "Select" [
		display "My Table" [

   table options ["ID" right .2 "Date" right .8] data (db-select * my-table)
		]
	]


]





do-events
Also, the use of get-values and set-values can make getting db data 
into and out of forms (a display with lots of basic input widgets) 
significantly easier [than individual widget addressing].
Claude
10-Oct-2008
[7790x5]
thank you very much ashley to your help ;-)
first for the print screen how to !!!
when i ask for a CRUD example i think about a optimize way of => 
1 - select data from a table-widget  2 - show values of each data 
of a row 3 - accept insert & update & remove 4 - check values before 
insert or update table-db and table-widget.
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
i think it is working but i am asking to optimize my code and with 
your help code better ;-)
Ashley
18-Oct-2008
[7795]
RebGUI build#117 released. Release notes here:http://www.dobeash.com/RebGUI/release.html#section-11
Graham
18-Oct-2008
[7796]
http://www.dobeash.com/RebGUI/release.html#section-11
Ashley
18-Oct-2008
[7797]
http://www.dobeash.com/RebGUI/release.html#section-11
Graham
18-Oct-2008
[7798]
tree is not new is it??
Ashley
18-Oct-2008
[7799]
Since the last release (build#101) it is. Not everyone gets the developer 
releases ;)
Graham
18-Oct-2008
[7800]
so, the actual changes are few then??
Ashley
18-Oct-2008
[7801]
Yes, if you're coming from build#116. But there's still a number 
of bug fixes in there ... and 117 is the first stable build since 
111.
sqlab
20-Oct-2008
[7802]
Ashley, there is still a problem with Click/Button and over.
The colour is irreversibly changing to the default in your demo
Claude
25-Oct-2008
[7803x8]
hello as you all now i am not a great reboler........................ 
but here you are a code to keep button color.
button: make pill [
	tip:	{
		USAGE:
			button "Hello"
			button -1 "Go!"
			button "Click me!" [print "click"]

		DESCRIPTION:
			Performs action when clicked.

		OPTIONS:
			'info specifies read-only
	}
	size:	15x5
	text:	""
	color:	colors/theme-dark
	keep-color: color
	font:	default-font-heading
	feel:	make feel [
		over: make function! [face act pos] [
		probe face/color

   set-color face either all [act not find face/options 'info] [colors/theme-light] 
   [face/keep-color]
		]
		
		engage: make function! [face act event /local f] [
			unless find face/options 'info [
				do select [
					down		[set-color face colors/state-light]
					alt-down		[set-color face colors/state-light]

     up			[set-color face colors/theme-dark face/action/on-click face]

     alt-up		[set-color face colors/theme-dark face/action/on-alt-click 
     face]
					away		[set-color face colors/theme-dark]
				] act
			]
		]
	]
	rebind:	make function! [] [
		color: colors/theme-dark
	]
	init:	make function! [] [

  all [negative? size/x size/x: 10000 size/x: 8 + first size-text self]

  all [find options 'info color = colors/theme-dark color: colors/outline-light]
		keep-color: color
		action/on-resize self
	]
]
you must recreate the fil REBGUI.R  with the command  CREATE-DISTRIBUTION.R
fil => file
oups i forget to modify face/feel./engage/away    here a better one
button: make pill [
	tip:	{
		USAGE:
			button "Hello"
			button -1 "Go!"
			button "Click me!" [print "click"]

		DESCRIPTION:
			Performs action when clicked.

		OPTIONS:
			'info specifies read-only
	}
	size:	15x5
	text:	""
	color:	colors/theme-dark
	keep-color: color
	font:	default-font-heading
	feel:	make feel [
		over: make function! [face act pos] [
		probe face/color

   set-color face either all [act not find face/options 'info] [colors/theme-light] 
   [face/keep-color]
		]
		
		engage: make function! [face act event /local f] [
			unless find face/options 'info [
				do select [
					down		[set-color face colors/state-light]
					alt-down		[set-color face colors/state-light]

     up			[set-color face colors/theme-dark face/action/on-click face]

     alt-up		[set-color face colors/theme-dark face/action/on-alt-click 
     face]
					away		[set-color face face/keep-color]
				] act
			]
		]
	]
	rebind:	make function! [] [
		color: colors/theme-dark
	]
	init:	make function! [] [

  all [negative? size/x size/x: 10000 size/x: 8 + first size-text self]

  all [find options 'info color = colors/theme-dark color: colors/outline-light]
		keep-color: color
		action/on-resize self
	]
]
i explain a little => i create a KEEP-COLOR and i init the good value 
in the init function .  this value is reuse in FEEL/OVER  and FEEL/ENGAGE/AWAY
Ashley can you give me a better way to do it ------------thank you
Ashley
26-Oct-2008
[7811]
That's pretty good. I've uploaded build#118 to SVN with your changes.
Claude
26-Oct-2008
[7812x5]
hi ashley        i would like to  make display more "modular" !!! 
 like this
panel-1: copy [
	text "coucou"
]

display rejoin ["test (build#" ctx-rebgui/build ")"] [
	
	panel-master: tab-panel  #LVHW data  [			
		"Bienvenue" [
			title-group %./images/setup.png data  "bienvenue" 			
		]
		"panel 1"  :panel-1

		"panel 2" [
		]

	] 
]
i would lilke to build display  not in the same source file............is 
it possible ?
re  i find something to do it ;-)
panel-1: copy [[
	text "coucou"
]]

do compose/deep [
	display rejoin ["test (build#" ctx-rebgui/build ")"] [
		tab-panel  #LVHW data  [			
			"Bienvenue" [
				title-group %./images/setup.png data  "bienvenue" 			
			]
			"panel 1"  (panel-1)

			"panel 2" [
			]

		]
	]
]




do-events
shadwolf
28-Oct-2008
[7817x2]
félicitations ^^
le copy sert a rien ...  mais a part ca ca va
Graham
3-Nov-2008
[7819x2]
I'm getting this error .. not sure why, perhaps faulty data

make object! [
   code: 312
   type: 'script
   id: 'cannot-use
   arg1: 'path
   arg2: 'none!
   arg3: none

   near: [either any [find options 'multi parent-face/type = 'table] 
   [
           all [rows = length? picked return data]
           blk: copy []
           either cols = 1 [
               foreach row picked [insert tail blk pick data row]
           ] [
               foreach row picked [
                   repeat col cols [

                       insert tail blk pick data -1 + row * cols + col
                   ]
               ]
           ]
           blk
       ] [
           blk: pick data first picked
       ]]
   where: 'selected
]
The trac is reporting an internal server error :(