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

World: r3wp

[!RebGUI] A lightweight alternative to VID

Ashley
2-Feb-2006
[2913]
Create a file called %test.r in view-root/public/www.dobeash.com/files/rebgui/ 
with the following:

	REBOL []

	do %rebgui.r


 view layout [text form system/version button "RebGUI" [display "" 
 [text "RebGUI from VID"]]]


and then run by double-clicking it. I see "1.3.2.3.1" in the text 
and clicking "RebGUI" displays the RebGUI window.
Graham
2-Feb-2006
[2914x7]
This is totally weird.
Your script runs okay.
I see the "RebGUI from VID" popup.
*BUT* if I run the same script from the console ... it does not work 
!
ie. if I type each command one by one.
do %test.r works
do %rebgui.r
and then 

view layout [text form system/version button "RebGUI" [display "" 
[text "RebGUI from VID"]]]
does not work.
Ashley
2-Feb-2006
[2921]
You're not alone:

REBOL/View 1.3.2.3.1 5-Dec-2005 Core 2.6.3
Copyright 2000-2005 REBOL Technologies.  All rights reserved.
REBOL is a trademark of REBOL Technologies. WWW.REBOL.COM


Licensed to: Ashley Truter (commercial) <[atruter-:-netspace-:-net-:-au]>
License ID: 5-00170-1

Type desktop to start the Viewtop.
>> change-dir %public/www.dobeash.com/files/rebgui
== %/C/rebol/view/public/www.dobeash.com/files/rebgui/
>> do %rebgui.r
Script: "RebGUI system" (6-Dec-2005)

>> view layout [text form system/version button "RebGUI" [display 
"" [text "RebGUI
from VID"]]]

fails for me too!
Graham
2-Feb-2006
[2922]
so, I'm not crazy!!!
Ashley
2-Feb-2006
[2923]
Even odder, creating a script with just:

	REBOL []

	halt

and then typing the exact same commands as above works!?
Graham
2-Feb-2006
[2924]
back later ..
Volker
2-Feb-2006
[2925x3]
what is the problem?
do http://www.dobeash.com/files/rebgui/get-rebgui.r
change-dir view-root/public/www.dobeash.com/files/rebgui
do %tour.r
if i do paste that, i get the tour running. (linux)
Ashley
2-Feb-2006
[2928]
That works, it's the interaction of VID/RebGUI when REBOL is started 
in a certain way that's the problem.
Volker
2-Feb-2006
[2929x9]
Here too..
that halt-trick works here too. portable bug.
Maybe this:
probe system/script/header
do %scratch.r
probe system/script/header
yep.
view layout [text form system/version button "RebGUI" [display "!!!" 
[text "RebGUI from VID"]]]
foreach window system/view/screen-face/pane [
        if title = window/text [return]
    ]
default title depends on system/script/header. with the halt in a 
script, you have a real title.
better compare faces with 'same? then by title?
btw if i vidify rebgui, is there a chance to get it accepted? or 
do you insist on the api-clashes?
Graham
2-Feb-2006
[2938x4]
Not sure what you're discussing Volker. This part "text form system/version" 
is not necesary for the script to fail.
Ahhh...
do %rebgui.r
and then 

view layout [text form system/version button "RebGUI" [display "This 
is needed!!" [text "RebGUI from VID"]]]
works :)
What's the technical reason for this failing with no window title?
Volker
2-Feb-2006
[2942]
the foreach above is from 'display. if you have a window with your 
title already, it simply returns. the default title with no header 
(no script) is "" ;)
Graham
2-Feb-2006
[2943x2]
so, the bug is with 'display
Must be an optimisation :)
Volker
2-Feb-2006
[2945]
yes. a hidden feature :)
Anton
2-Feb-2006
[2946x2]
Perhaps back then Ashley thought that he would be saving memory, 
by storing a block of strings instead of a block of window faces 
?
(I'm not sure of his intent with this, though...)
Ashley
2-Feb-2006
[2948x2]
It's an optimization that prevents multiple windows with the same 
title from being displayed. Quite useful in apps where you don't 
want someone clicking on a button multiple times and getting multiple, 
identical displays. I avoided basing it on face comparisons as two 
windows could be "identical" except for a single sub-face such as 
a timestamp. Must be working reasonably well as no-one has noticed 
it in almost a year. ;)
BTW, good spot Volker. As for your two questions:

1) If i vidify rebgui, is there a chance to get it accepted?


I'll except anything that makes writing a REBOL GUI (View, VID, RebGUI, 
whatever) easier. ;)

2) Do you insist on the api-clashes?

Not sure what the issue is here, please elaborate.
Graham
2-Feb-2006
[2950x2]
I guess he means the name clashes for select-colour, date etc. which 
you already have noted.
request-*
Volker
3-Feb-2006
[2952x5]
No, argument-lists for actions, init is a block in vid (i suggest 
a rename, init: [rebgui-init] and both are happy.) maybe some others.
some vid-fields supported, like /flags, /access. So that 'layout 
and firends do not crash.
means i have to patch nearly everywhere a little bit, although close 
to find/replace. Can do that.
buit need agreement on the changes, or have to keep a private version 
and repatch each release. which means i stick with vid.
stick for new styles. if i could use widgets in vid, i would do my 
styles with rebguii. (also need a bsmall version, a few 10 kb then. 
i guess without dictionary would be enough).
DanL
6-Feb-2006
[2957x2]
Is there a checkbox-list widget for RebGUI?  I'm looking for something 
like this:
http://www.jidesoft.com/images/checkboxlist.png
Graham
6-Feb-2006
[2959x4]
yes there is.
you can group them into check-groups
Ahh.. you wanted a list ...
Just add a scroller to scroll the checkgroup windows