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

World: r3wp

[!REBOL3 GUI]

Pekr
18-Jan-2011
[5286x3]
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
[5315x2]
no, I don't ... just the general doc for the WIP, plus your resizing 
docs ...
I vote for the MDP docs being added into the distro, if possible 
... or their generated html variant ...
Ladislav
19-Jan-2011
[5317]
So, guys, is there any new revised release in the plan?
 - most probably next week
Or any explanations to my findings?

 - having trouble to reproduce some of your findings here, and some 
 problems are related to the parts Cyphre is working on
Robert
19-Jan-2011
[5318x2]
http://www.rm-asset.com/code/level1/r3-gui/resizing/#sect5
HTML docs are online.
Ladislav
19-Jan-2011
[5320x2]
regarding your layout containing the WHEN and CLICKER elements, they 
look like still being incompatible with the current resizing
(that was a note to Pekr)
Pekr
19-Jan-2011
[5322x6]
I know Ladislav - I even tried to comment them out, becuase I was 
nervous about the top empty space, which can be seen in the image 
I posted.
I even took the content out, to remove it from the demo dependency, 
and tried, I posted short script, and the space is still there ...
You can see the short script few of my messages above - the spaca 
is still there. I worry, that I still don't have good understanding 
of panel content handling functions, I used:

child: make-face 'vpanel []
set-panel-content child lay
view child
or 'hpanel [break-after: 1]
You can see what I have got resizing such a layout: http://xidys.com/pekr/rebol/messy-resizing.jpg
When i close window, and call my %test.r3 again, I get stack overflow 
we discussed earlier ... Dunno, why I did not get it running the 
first time ...
Ladislav
19-Jan-2011
[5328]
CLICKER was not adapted, so no matter how hard you try, without adapting 
it, you cannot achieve good results
Pekr
19-Jan-2011
[5329x2]
I think that the trouble is in make-face and how the panel is preconstructed 
.... because when I use the same layout submitted just to view, it 
works correctly ...
I am not judging the clicker, just comment it out :-)
Ladislav
19-Jan-2011
[5331]
so what, when I comment the two incompatible parts of the layout 
out, it looks normal doesn't it?
Pekr
19-Jan-2011
[5332]
OK, just try very simple layout:

lay: [button "OK"]

child: make-face 'hpanel [break-after: 1]
set-panel-content/no-show child lay
view child
Ladislav
19-Jan-2011
[5333]
what is wrong with that?
Pekr
19-Jan-2011
[5334x2]
It does just the same here - first the dialog box with button is 
displayed ... I close it ... then I do the script again, and I get 
stack-overflow ...
I use the latest r3-gui.r3