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
22-Jun-2006
[3935]
rats .. using Cyphre's radio-group.r gives me an error.  I guess 
there must be dependencies elsewhere.
Cyphre
22-Jun-2006
[3936]
Graham, what exact error are you getting?
Graham
22-Jun-2006
[3937x5]
just rebuilding ...
** Script Error: Cannot use add on block! value
** Where: action
** Near: set-sizes 2 + guisizerg/data
set-fonts/size
** Press enter to quit...
now this is my code .. but it works with Ashley's radio-group
label "Gui Size" 20 guisizerg: radio-group 30x5 data [2 3 4 5] [ 
           
            ] return
I am asking the user to set the gui size at start up.
Cyphre
22-Jun-2006
[3942x2]
>> guisizerg/data
== [3 4 5]

so you cannod add on block as the error tells you ;)
didn't you want guisizerg/picked instead of data?
Graham
22-Jun-2006
[3944x3]
yep .. it was not a block before.
picked is new??
yeah .. looks like it.
Cyphre
22-Jun-2006
[3947]
from the message above: "you can get the selected item using my-radio-group/picked"
Graham
22-Jun-2006
[3948]
I guess that's why we should have accessors and standard ways of 
accessing data so nothing breaks.
Cyphre
22-Jun-2006
[3949]
Yes, I changed the radio-group behaviour a bit so it works more consistent 
(at least IMO). Ofcourse if this is a backward compatibility problem 
then use the old version. I agree there shoudl be default accesor 
system but AFAIK current RebGUI lacks it so maybe a good improvement 
for future?
Pekr
22-Jun-2006
[3950]
Cyphre - in near future? :-)
Cyphre
22-Jun-2006
[3951]
I have big problems with predicting future all the time ;)
Graham
22-Jun-2006
[3952x2]
I think it is imperative really as otherwise we are forced to delve 
into the internals of rebgui to do simple things.
although Carl is not keen on oo programming, it really does work 
well with GUIs.
Cyphre
22-Jun-2006
[3954]
agree, oop is well suited for such things.
Pekr
22-Jun-2006
[3955x2]
VID accessors is good methog, it just stopped half-way, which is 
a pity ... should work in set-face 'attribute 'value mode, and not 
only in set-face 'value one....
... if that is the thing you are talking about in regards to oop 
and overriding methods :-)
Graham
22-Jun-2006
[3957]
It would be nice if rebgui could be prettified .. with backgrounds 
etc.
Cyphre
22-Jun-2006
[3958]
The problem is RebGUI was initially designed as simple and resources 
efficient system. Now RebGUI users want more and more :-) So exteding 
the system based on the initial idea is not so easy ;)
Pekr
22-Jun-2006
[3959]
:-) .... but it also does not mean, that things like exposing some 
central settings to some objects (as colors etc.) should necessarily 
bloat RebGUI, or does it?
Graham
22-Jun-2006
[3960]
Ah.. I have too many things that rely on the internals of the radio-group 
.. perhaps try another day
Ashley
22-Jun-2006
[3961]
Graham, "is there going to be a formal syntax description for the 
rebgui dialect" ... I can certainly get the ball rolling, can you 
point me to a good format we can base it on?
Graham
22-Jun-2006
[3962]
not really .. can we just use datatypes to describe the syntax?
Ashley
22-Jun-2006
[3963]
Something like: http://www.rebol.com/docs/view-system.html#section-2.2
Graham
22-Jun-2006
[3964x5]
>> display "" [ rg: radio-group data [ "M" "F" ] do [ rg/select-item 
2]]
** Script Error: Cannot use path on none! value
** Where: switch

** Near: if pf/picked <> face/data [old: pf/picked if old [clear 
skip pf/pane/:old/effect/draw 7 show pf/pane/:old] pf/picked
: fa...
Ashley, that would help.
the problem is this line ... pf: face/parent-face
pf is none
I recall having similar problems with Ashely's radio-group as well.
Graham
23-Jun-2006
[3969x4]
In the select-item function, need also this : picked: item
as otherwise the picked function fails if you use the select-item 
to set the radio-group
submitted radio-group bugs to trac ... seems a large number of active 
tickets :(
What's the best way to allow a user to define their own forms without 
reimplementing Vid or rebgui parser ?
Ingo
24-Jun-2006
[3973x4]
I just tried rebgui, and I have a few questions ...

is there a reason, that display opens the windows, but does not start 
do-events? This seems a bit strange to me. When testing layouts in 
the console, I mostly end up with inactive windows.
Is it possible to get the window size?
Is it possible to set an own resizer function?
I have tried to create something like a calendar layout:

two TEXTs, and a TEXT-LIST below them, and then 2 rows and 2 columns 
of this. 

The internal resizer was not able to cope with this, either the left 
widgets, or the right widgets were resized. Is it just me, or is 
the resizer not able to cope with this?
Graham
24-Jun-2006
[3977x2]
show us your code...
RT is promoting Rebgui http://www.rebol.net/article/0280.html
Ingo
24-Jun-2006
[3979x2]
Version 1, left, down resized ...

display "Test 1" [
   tight
   text 40 #w "free" 
   text 10 #w "11"
   text 40 #w "empty" 
   text 10 #w "12"
   return
   text-list 50x50 #hw data ["entry1" "entry2"]
   text-list 50x50 #hw data ["entry3" ]
   return
   text 40 #w "nothing" 
   text 10 #w "21"
   text 40 #w "whatever" 
   text 10 #w "22"
   return
   text-list 50x50 #hw data ["entry1" "entry2"]
   text-list 50x50 #hw data ["entry3" ]
]
do-events
Version 2, upper left resized ...
display "Test 2" [
   tight
   text 40 #w "free" 
   text 10 #wx "11"
   text 40 #wx "empty" 
   text 10 #wx "12"
   return
   text-list 50x50 #hw data ["entry1" "entry2"]
   text-list 50x50 #hwx data ["entry3" ]
   return
   text 40 #wy "nothing" 
   text 10 #wxy "21"
   text 40 #wxy "whatever" 
   text 10 #wxy "22"
   return
   text-list 50x50 #hwy data ["entry1" "entry2"]
   text-list 50x50 #hwxy data ["entry3" ]
]
do-events
Graham
24-Jun-2006
[3981x4]
the first one you need a #Y for those you want to have a y displacement
what's wrong with the second one?
I've been looking at how to save a form contents and reload the same 
values when opening the form.
all the widgets are anonymous