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

World: r3wp

[!RebGUI] A lightweight alternative to VID

DanielP
5-Mar-2008
[7442x2]
I try to use RebGui with Q-Plot but the plot is in a separate window 
instead of to be inserted intto rebgui  display.
do %rebgui.r
do %q-plot.r
   
append-widget [ 
    plot-widget: make rebface[                             
    view quick-plot [
        300x300
        fill-pen blue
        pen red
        bar-width 15
        bars [5 3 8 2 10 3 4 9 5 7]
        label "Meaningless bars"
        y-axis 9
        ]
        
    ]
]    
                                                 
display "Plot 1" [

                group-box "Graphique" data [plot-widget]                      
                 ]
do-events
JohanAR
6-Mar-2008
[7444x2]
I'm having some trouble that I was hoping you could help me with.. 
again :)


I want to have a tab in a tab-panel that contains some kind of group 
block and a button. Every time the button is pressed the group block's 
contents should change to a new, dynamically generated, GUI block.


It works up to the part where the button is pressed, but the group 
block is never changed.
I can add that the dynamically generated GUI consists of a mixture 
of texts, fields and another button. When that button is pressed 
all fields are evaluated and possibly modified.
DanielP
6-Mar-2008
[7446x3]
I found the solution by myself :
pane: reduce [                             
     quick-plot [
        300x300
        fill-pen blue
        pen red
        bar-width 15
        bars [5 3 8 2 10 3 4 9 5 7]
        label "Meaningless bars"
        y-axis 9
        ]             
      ]
remove the" view" command & add a reduce command
Kai
7-Mar-2008
[7449]
Ashley, I just tried the 'bistate option from 1.12 and am not sure 
that it works properly. I can toggle between green checkmark and 
blank box via left MB (and the red cross via the right MB has become 
unreachable).  I would have now expected the blank state to replace 
the off state but apparently it still does stand for NONE and displaying 
a CB in False state still shows the red cross......?
Ashley
8-Mar-2008
[7450]
A null selection in [default] tri-state mode is none! and I didn't 
want to confuse the issue by changing it to false in bi-state (even 
though taken in isolation that would be logical, pardon the pun). 
The bi-state option merely disables the RMB action, it doesn't change 
how or what data you pre-populate with.


If enough folks want it I can make the widget a pure bi-state affair 
that returns true and false (I no longer need the tri-state functionality) 
... but that may break exisitng apps that either depend on the functionality 
or expect none!
Graham
8-Mar-2008
[7451]
Let us know if you do so I can fix my apps
Graham
9-Mar-2008
[7452x2]
Using Linux, I don't see the characters I expect with the fast forward, 
rewind etc ...  I guess due to the different fonts involved.  Is 
there a work round?
Or a symbol font we can sub.
JohanAR
9-Mar-2008
[7454x3]
I have a problem, possibly a bug, with the following code. If I press 
start, I get a popup window. Both these can be closed as expected. 
It also works if I press the next button - popup nr 1 is replaced 
by nr 2. Again, both windows can be closed as normal. However, if 
I press next twice and close both windows then Rebol seems be be 
stuck in do-events and the program never terminates.
print "bugz"
do %script/rebgui.r

maingui: [
	text "Hello" return
	button "Start!" [ display-next-word	]
]

count: 0

secondgui: does [
	compose [
		text (join "popup nr " count: count + 1) return
		button "next" [ display-next-word ]
	]
]

display-next-word: make function! [] [
	hide-popup
	display/dialog "Go!" secondgui
]

display "word!" maingui
do-events
halt
Think I've found a bug.. If have a button that does some stuff and 
then hides itself. Works great if I click it, but if I select it 
with tab, press space and then tab again the button will reappear.
DanielP
10-Mar-2008
[7457x7]
Hello.  Sorry for the huge number of questions I ask  ^^
Is it possible to move a widget within a display block ?
for example, transform: display "MyFace" [
               box red               
               box blue               
           ]
to:   display "MyFace" [              
               box blue               
           ]
(sorry, it's a mistake)
to: 
display "MyFace" [
               box blue       
               box red                                       
           ]
by clicking on a button by example
btiffin
10-Mar-2008
[7464x2]
Daniel; Check out http://www.rebol.org/cgi-bin/cgiwrap/rebol/view-script.r?script=layout-1.8.r
for a what you see is kinda what you get layout editor.   The tricks 
will be buried in the code, but it has to do with ordering the face/pane 
entries.  Also see http://rebol.com/docs/view-system.html#section-3
for a description of face/pane.
My bad.  Just noticed this is RebGUI ...  although the same principles 
apply.
Graham
14-Mar-2008
[7466x5]
I think display should always return a value.

>> do %rebgui.r
Script: "Untitled" (none)
>> test: display "Test" [ text "Hello" ]
>> test: display "Test" [ text "Hello" ]
** Script Error: test needs a value
** Near: test: display "Test" [text "Hello"]
>>
In the second instance, display picks up the window already exists, 
and just exits without returning a value.  Perhaps it should return 
none instead ?
foreach window view*/screen-face/pane [all [title = window/text exit]]

perhaps change to 


foreach window view*/screen-face/pane [if  title = window/text [ 
return none]]
Actually this has been a source of a long standing bug ... I didn't 
realize till now that the return behaviour differed.
bug for me ...
Ashley
14-Mar-2008
[7471]
returning none! is better than returning unset! so changed in next 
build as above.
Graham
15-Mar-2008
[7472x3]
display "" [ area 100x100 options [ info ] on-click [ print "You 
clicked me"]] do-events

- the area does not respond to the on-click action whereas


view layout [ info 40x40 [ print "You clicked me" ]] works fine in 
VID
display "" [ button "Test2" [ display/parent "Test2" [ text "test2" 
button "close" [ unview/only face/parent-face ]]]

button "Test3" [ display/parent "test3" [ text "test3" button "close" 
[ unview/only face/parent-face ]]] button "Halt" [
unview/all ]] do-events
click on "test2" and then click on "test3".  Now close down the test2 
window and the test3 window also closes down.

Now click on the "test3" button ... nothing happens ... I guess it 
thinks that the test3 window is still open.
JohanAR
15-Mar-2008
[7475]
Did 2.7.6 break tooltips, or did I manage to screw up my program 
without noticing?
Graham
15-Mar-2008
[7476]
did you test tour.r ?
[unknown: 5]
15-Mar-2008
[7477]
Would be a cool RebGUI project: http://www.colorflip.com/
JohanAR
15-Mar-2008
[7478]
I've managed to screw up my program somehow :( hehe. Problem is I 
can't remember when the tips worked last time. Adding them dynamically, 
so it's not quite straight forward to debug
Graham
15-Mar-2008
[7479]
Ashley, you can amend your docs now the function keys which now work 
in Linux
Ashley
15-Mar-2008
[7480]
Will do.
JohanAR
16-Mar-2008
[7481]
Is there an easy way to get two buttons in the bottom right corner 
without using "reverse"? Reverse messes up the tab-order :(
Robert
16-Mar-2008
[7482x2]
Idea: I'm not a big fan of menus, tabs etc. to switch through an 
application. Looking at all these new GUIs from Apple styles (when 
viewing photos where it's like a fan and the middle photo zoomed) 
or the piclens stuff I had the idea how to use this for an app.


How about having a way where I can see a miniatur screen of every 
data-form in a 2D grid moving in 3D space, where I can scroll left 
/ right to the right picture, click it and get the data-form?
I'm not sure if Rebol could handle this. But with this it would be 
very nice to navigate an app. Something like the slide sorter in 
Powerpoint but with more eye-candy.
Ashley
16-Mar-2008
[7484]
Certainly possible (creating an image of a display is trivial), but 
how would it be used / specified in practice, and what would we call 
this new widget? Perhaps a grouping widget?

	fan data [
		display "A" [...]
		display "B" [...]
		display "C" [...]
		...
	]


which would create a series of clickable display icons ... click 
the icon and that display comes to the foreground. Is that sort of 
what we are talking about?
RobertS
16-Mar-2008
[7485x3]
There seems to be a problem in 2.7.6 on WIn XP
start  rebvire them go to console
do %rebui.r
editor %some_file_not_yet_existing.r

; now hit Save as : concole returns and both console and editor are 
locked up
; TEST

; REpeat without load of rebgui.r ; warning so such file and then 
Save As will save as that file no problem
start rebview ; take typing lessuns furst  if nead bea  or vist www.wordie.org 
more often ...  varve,or silt laminae in lake beds varying with ...
start rebview and goto console
do %rebgui.r
Graham
16-Mar-2008
[7488x2]
You can't use VID and Regbui easily together like that
editor is VID.
Robert
17-Mar-2008
[7490]
Ashley, yes exactly. I think users will be much better in remember 
a screen layout instead of where in a menu hierarchy you find an 
entry.
Graham
17-Mar-2008
[7491]
Ashley, what do you feel about adding a default windowless menu for 
on-alt-click for fields for copy/paste ?