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

World: r3wp

[!REBOL3 GUI]

Pekr
17-Jan-2011
[5266x2]
OK, I will adapt ... the intention is to make demo working on RMA's 
GUI. We will see, how it turns out down the road ... I am slow, because 
I still have little knowledge of GUI itself, pluse I am really not 
a programmer :-)
... but -better to do something, than nothing ...
Henrik
17-Jan-2011
[5268]
it's possible that you have to use different methods than what Carl 
used. many functions were dismantled and rebuilt to support higher 
granularity and this process is not entirely complete yet. in the 
end, it should be just about as easy to build the demo using RM Asset's 
version as well as Carls, except for more solid behavior.
Pekr
17-Jan-2011
[5269]
Yes, it is just my general opinion is, that higher modularity could 
be hidden from user, if possible. But as I said - I now have an idea, 
that something like switch-panels should be rather easy to be rewritten 
using new functions ... I got simply confused, as I found the switch-panel 
function in the distro, so I assumed it should work. Now I will be 
more carefull ...
Henrik
17-Jan-2011
[5270]
transition effects: that may have to wait as animation is low priority, 
but when it becomes possible, you may well have much better options 
for doing real animation.
Pekr
17-Jan-2011
[5271x3]
OK
Should text style work?

text [bold "Toggle button..."] gives me:


Script: "R3 GUI - Development Test Script" Version: 0.1.2 Date: none

** User error: {TO-TEXT - syntax error at: [bold "Toggle button..."] 
...}
Got to go - but - is there anything like vpanl alignment? I got first 
form of demo kind of working (buttons), but the content is aligned 
to the bottom. Also - pressing buttons does not work so far either:


** GUI ERROR: Cannot parse the GUI dialect at: panel 240.100.80 title 
Alert grou
p doc Button pressed! scroller
Ladislav
17-Jan-2011
[5274x2]
But both make-panel and switch-panel just worked, whereas now they 
are replaced but tonnes maybe fine-grained functions = better flexibility, 
but also removing visual effects.

 - are you not able to read? SWITCH-PANEL is not replaced by anything
Carl's comment after a "preliminary peek": "It seems that the design 
is going well, and this team is very REBOLish in their methods and 
concepts.  So, I am not worried."
Pekr
17-Jan-2011
[5276x2]
preliminary peak
 = Carl did some recent revision? :-)
If so, good he is catching-up back to R3 stuff!
Kaj
17-Jan-2011
[5278]
He also reviewed CureCode
Pekr
17-Jan-2011
[5279]
I am still probably not understanding, how to properly use panel-content 
functions. Second consecutive run of following code causes a stack 
overflow ...

lay: [button "OK"]

child: make-face 'vpanel [columns: 1]
set-panel-content child lay
view child
Ladislav
17-Jan-2011
[5280x3]
how exactly am I supposed to reproduce it?
Err, that [columns: 1] is an anachronism, we replaced it by [break-after: 
1] (for a hpanel, break-after specifies, how long the rows are, while 
for a vpanel, how long the columns are)
so, the [columns: 1] is ignored
Pekr
18-Jan-2011
[5283x6]
Ladisla - thank, that was it. I mean - break-after fixed it.  With 
above - columns, to simply reproduce it, just view child, close the 
window, and call view child once again ... it breaks to console after 
a while with stack overflow. Well, now I know that 'columns is not 
used anymore, but you might try to look at it, if you have time, 
to see why it causes stack overflow ...
Hmm, nothing seems to be fixed ...
Could you try following code? You can eventually replace 'vpanel 
by 'hpanel [break-after: 1]. With vpanel, it just causes stack overflow, 
with hpanel, it kind of displays panel, but try to resize the window 
and see the mes ...


REBOL []

do %r3-gui.r3

lay: [

		when [load] do [print "Load trigger!"]
		clicker
		button "Do" alert "Button pressed!"

  button "Big Quit Button" maroon options [max-size: 2000x50] quit
		bar
		text "Toggle button..."
		t1: toggle "Toggle" of 'tog
		button "Set False" set 't1 false
		button "Set True"  set 't1 true
		toggle "Mirror" attach 't1
		toggle "Mutex" of 'tog
		bar
		text "Radios and check boxes"
		radio "Set above toggle on"  set 't1 true
		radio "Set above toggle off" set 't1 false
		bar
		check "Checkbox attached to above toggle" attach 't1


]

child: make-face 'vpanel []
set-panel-content child lay
view child
Well, I stop my tries to port a demo now. My take is, that following 
primitive code should work easily, when repeated for the second time, 
but it does not:

lay: [button "OK"]

child: make-face 'hpanel [break-after: 1]
set-panel-content/no-show child lay
view child


My take is, that either make-face is not creating a structure needed 
later, or 'parse-panel is buggy, or I don't know what :-)

** Internal error: stack overflow

** Where: reduce switch parse to-text reduce parse to-draw all update-subgobs 
fo

reach update-subgobs show-native show-native show-native show-native 
show-native

 show-native show-native show-native show-native show-native show-native 
 show-na

tive show-native show-native show-native show-native show-native 
show-native sho

w-native show-native show-native show-native show-native show-native 
show-native

 show-native show-native show-native show-native show-native show-native 
 show-na

tive show-native show-native show-native show-native show-native 
show-native sho
w-native show-native show-native show-native s...
eh, excuse me, couldn't following code be causing an infinite loop? 
:-)

show-native: :show
show: funct [gob][
;	print "SHOW>>>>"
;	set 'gcnt 0
;	t: now/time/precise
	update-subgobs gob
;	print ["updated:" gcnt "GOB(s) in " now/time/precise - t]
;	t: now/time/precise
	show-native gob	
;	print [now/time/precise "SHOW call in" now/time/precise - t]
;	gob
]
The only place show-native is called separately from is - 'hide-tooltip 
...
Ladislav
18-Jan-2011
[5289x3]
who wrote the above SHOW function?
(I was unable to reproduce the stack overflow)
I was able to not only repeat the VIEW CHILD twice, but even ten 
times without any stack overflow
Pekr
18-Jan-2011
[5292x2]
I don't know, it is taken from your latest build?
I just hope I don't have mess on my HD :-(, I have several versions 
here to study, even Carl's one ...
Ladislav
18-Jan-2011
[5294]
I am certainly not using that one here, will have to discuss it with 
Cyphre
Pekr
18-Jan-2011
[5295x3]
it's taken from the source/view-show.r3
I am just wondering - it will cause a stack overflow at each show 
call. I wonder - show is not called the first time? How is that it 
crashes the second time?
I will unpack the sources again ...
Ladislav
18-Jan-2011
[5298]
aha, sorry, you may have the correct one
Pekr
18-Jan-2011
[5299]
hmm, it really seems to be in r3-gui-src.zip ...
Ladislav
18-Jan-2011
[5300]
But, anyway, it is strange, that I am unable to reproduce your findings
Pekr
18-Jan-2011
[5301x4]
ok, then I have maybe messed r3-gui.r3 .... will unpack the latest 
one ...
hmm, it's in there too ...
show-native: :show
show: funct [gob] [
    update-subgobs gob
    show-native gob
]
ok, moving home from work, later ...
Pekr
19-Jan-2011
[5305x3]
So, guys, is there any new revised release in the plan? Or any explanations 
to my findings? Thanks :-)
btw - maybe more direct question - where's defined spacing between 
the elements? I mean - I run Carl's demo next to RMA's demo, and 
I think that Carl's version got element spacing more pleasant. Where 
should I look to change it?
Any pointer appreciated ...
Henrik
19-Jan-2011
[5308]
Cyphre is ill (flu), so there might be some delays in answers.
Robert
19-Jan-2011
[5309x2]
Petr, do you have a screenshot?
We have the box-model like CSS, so there are a lot of different spacing 
things that can be defined.
Pekr
19-Jan-2011
[5311x3]
ok, I'll make one right away ....
http://xidys.com/pekr/rebol/r3-gui-comparison.jpg
this is just first prototype of first section. I have problem making 
a panel, to work reliably ... I don't understand the space at the 
top of the panel, that is still probably buggy on my part ...
Robert
19-Jan-2011
[5314]
Cool... you already made good progress. Do you know the boxmodel 
graphic? I might need to add it to our web-page.
Pekr
19-Jan-2011
[5315]
no, I don't ... just the general doc for the WIP, plus your resizing 
docs ...