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

World: r3wp

[!RebGUI] A lightweight alternative to VID

GrahamC
7-Oct-2010
[8862x5]
display "main" [ text "this is some text" button "child" [ display/parent 
"Child" [ text "close this window" button "grandchild" [ display/parent 
"Grandch
ild" [ text "topmost windo"]]]]] do-events
close the window that says "close this window" and then try to open 
all the windows again
The grandchild window will not open again.
http://screencast.com/t/y0PwDD9JBYoshowing this behaviour
so must be the use of display/parent that is different
Ashley
7-Oct-2010
[8867]
Can't reproduce using build#117 or 218 on Mac. Perhaps it's a Windows 
(7?) specific issue?
TomBon
21-Nov-2010
[8868]
how to add dynamically data to the tree?

face/data or SET-DATA doesn't work for me here...
GrahamC
21-Nov-2010
[8869]
I don't think you can.
TomBon
21-Nov-2010
[8870x5]
oups!
sure?
can change the data, no rebind,init or whatever to display the new 
data?
what about the accessor functions? BUILT-TREE etc. any change via 
this?
oki, looks like a static piece. thx graham...
GrahamC
28-Nov-2010
[8875]
Is there a way to monitor all events ?  In vid you can do 'insert-event-func 
but in Rebgui we have this system/view/screen-face/feel: none	; kill 
global events system (used by 'insert-event-func)
Ashley
29-Nov-2010
[8876]
You can comment out that line without causing any harm [to RebGUI].
GrahamC
29-Nov-2010
[8877]
I did and started getting lots of errors!
Ashley
29-Nov-2010
[8878]
Odd, I just tested with b117 and ran tour.r without a problem.
GrahamC
29-Nov-2010
[8879]
We're running different builds I guess
Awi
13-Jan-2011
[8880x5]
I am using build 117 (public) for creating a reservation application. 
I noticed a tremendous slow down on hovering above buttons created 
at the beginning, but hovering at the buttons created at the end 
is fast. Here is a code sample:
REBOL []

do %rebgui.r
seat-layout: copy []

loop 16 [
	insert tail seat-layout compose/deep [panel 50 data []]
	for row 1 15 1 [
		foreach col [A B - D E] [

   insert tail last seat-layout compose/deep [button 7x5 blue (rejoin 
   [row col]) [alert face/text]]
		]
		insert tail last seat-layout [return]
	]
]

display "test scroll panel" compose/deep [
	calendar 
	scroll-panel 152x100 #HW data [after 4 (seat-layout)]
	calendar
]
do-events
If you move your cursor quickly over the calendar on the left, it 
will leave a trail while focusing, it gets worse when you try to 
select a button in the scroll panel. But the right calendar is not 
affected.
Strangely, when you scroll the panel to bottom right, everything 
is back to normal in that condition, but when you scroll back to 
top left, things are the same again. Any hints how to fix this?
This trailing hover problem is not visible in build 218, but I need 
drop- and edit-list for my app, and these two are broken in b218. 
Thanks for the help!
Ashley
13-Jan-2011
[8885]
On a Mac, no problem. On WinXP it appears that the events are being 
generated faster than they can be processed. Good test case, I've 
never seen this before! ;)


I don't have an immediate fix, but this is one more reason for me 
to get the 2.x series released. Are drop- and edit-list the only 
roadblocks for you?
GrahamC
13-Jan-2011
[8886]
eh?? Is RebGUI alive again?
Ashley
13-Jan-2011
[8887]
Depends on how big the roadblocks are. It's easier to fix *-list 
than port the 2.x event handling back to 117! ;)
Awi
14-Jan-2011
[8888x6]
Ashley, that would be very cool. But with b217/8 I also experienced 
another strange thing when popping up a window on button click. Sometimes 
some texts in the window are blank, sometimes it's displayed correctly. 
The window consists of several panels, fields and buttons. It's reproducible 
consistently, I'm trying to make a sample code for this.
This don't happen in b117 (the same code, except I had to replace 
'question' to 'confirm' and 'ctx-rebgui/layout/only' to 'layout/only')
After an exhaustive testing, by luck I found out the problem. It 
was the table. The bug is pretty strange tough. Here is the test 
case:
REBOL []

do %rebgui.r
seat-layout: copy []

for slot 1 16 1[
	insert tail seat-layout compose/deep [panel 50 data []]
	for row 1 15 1 [
		foreach col [A B - D E] [

   insert tail last seat-layout compose/deep [button 7x5 blue (rejoin 
   [row col]) [display "test" [text "see me?"]]]
		]
		insert tail last seat-layout [return]
	]
]

display "test scroll panel" compose/deep [

 table options ["id" left .2 "name" right .8] data [1x2 "A to B" 3x4 
 "C to D" 5x5 "E to F"] return 
	calendar 
	scroll-panel 152x100 #HW data [after 4 (seat-layout)]
]
do-events
If you run the code, clicking any button will show a new window with 
the text "see me?". But once you select the first table entry, clicking 
on the button will show you an empty window. The only cure is to 
hover on the second or third entry. Hovering is enough to fix the 
not drawn text problem.
But once you start clicking on the calendar, the text will be hidden 
again. Another hovering on the second or third table entrywill bring 
it back again. This only happens to text and fields. Text in buttons 
are not affected.
Awi
15-Jan-2011
[8894x6]
I found another problem with b218: when there is a spinner style 
in display, the confirm and alert requestor's button do not works:
display "test scroll panel" [
	myspinner: spinner options [$0 $10 $1] data $5
	button "confirm" [confirm "yes/no works?"]
	button "alert" [alert "OK works?"]
]
do-events
Sorry for reporting only bugs, I like the 2.x series so much, it's 
much faster, no slow scrolling, I do really hope this version gets 
stable and usable. Currently it's the only usable GUI for me with 
nice graphic.
Here I found another bug with the text-list style. When your list 
is longer than the box (means you have to scroll), deleting the item 
at the bottom caused some calculation mismatch in redraw. This don't 
happen when you start deleting from the top. Here is the test case:
do %rebgui.r

display "test scroll panel" [
	tl-rute: text-list data [ "a"  "b"  "c"  "d"  "e"  "f"]
	button  red "-" [
		if tl-rute/selected [
			remove find tl-rute/data tl-rute/selected
			tl-rute/redraw
		]
	]
]
do-events
Delete "f", then delete other items, you will start to see "none" 
displayed in the list. This don't happen if you start by deleting 
other than "f" items.
GrahamC
15-Jan-2011
[8900]
usually there are methods to do this ..  certainly there is for table/remove-row 
n
Awi
15-Jan-2011
[8901x2]
RebDOC says nothing about deleting rows in text-list. Yes there is 
add-row and remove-row in table.
But the table in 2.x has the habit to prevent drawing text :-), that's 
why I moved my code to text-list, avoiding tables.
Awi
17-Jan-2011
[8903]
Ashley & Graham, just want to let you know that my reservation program 
using b218 is finished, and has been working perfectly. Many thanks 
for your work on RebGUI and all the support. Hopefully I can join 
the effort soon and give some work back to the community. (Currently 
I only have drop-list2 and text-list2, but both are incomplete and 
based on incomplete b218, so I think sharing them will do more confusion 
than help).
GrahamC
17-Jan-2011
[8904]
Maybe we should have moved RebGUI to github instead so people could 
fork and post their changes ... I guess we could still do so if Ashley 
restarts development.
Awi
17-Jan-2011
[8905]
Yes good idea, and if I'm not asking too much, just a small documentaion 
explaining the basic concept of 2x RebGUI, to get people (me) started. 
Currently my only reference is RebDOC and tour.r and diff-ing with 
117. For example I wanted to bring the b117 panel style (no border, 
silver background) back, I looked for some hours, and give up. Even 
some short points in this AltMe thread would be helpful. For example 
I found out how to do append-widget in 2.x through searching in google 
and found the chat history in altme.
GrahamC
17-Jan-2011
[8906]
Yeah ... the docs are in this channel for the tricky stuff.  But 
Ashley has assumed that R3 was going to quickly replace R2 hence 
the lack of movement here.
Awi
17-Jan-2011
[8907]
I also assumed that since like 2008 :-) Some things like this project 
cannot wait, and RebGUI and Rebol2 are more than good enough for 
almost every case in my project. And I think if Rebol3 and r3-gui 
are out someday, I'll just rewrite my apps.
GrahamC
17-Jan-2011
[8908]
Agreed.
Awi
6-Feb-2011
[8909x3]
Found another bug in b218: when using rate and feel, Ok button in 
alerts no longer working, the same with Yes/No buttons in confirm. 
Here is a code sample:
do %rebgui.r

display "rate feel test" [
	lbl: label "label with rate feel" 
		rate 1 
		feel [
			engage: func [f a e] [if a = 'time [print "awi"]]
		]
	btn "test alert" [alert "can you close me?"]
	btn "?" [? lbl]
	btn "unset lbl/rate" [lbl/rate: none show lbl]
	btn "set lbl/rate" [lbl/rate: 1 show lbl]
]
do-events
Nice thing is, when I turn off "rate", it works again, so currently 
I have a workaround, thanks God, I'm very close to shipping as I 
found this bug :-)
Basically what I'm doing is reading/monitoring a serial port using 
rate/feel. Since Rebol does not have a timer, the only thing I can 
think of is using rate/feel, which works very nicely as long as you 
don't "wait". "wait'" will kill your "thread" as the next timer event 
kicks again.