World: r3wp
[!REBOL3 GUI]
older newer | first last |
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 | |
Ladislav 19-Jan-2011 [5336x2] | that part is not reproducible for me |
(even when doing it ten times, no stack overflow) | |
Pekr 19-Jan-2011 [5338] | OK, I'll redownload all stuff again from RMA ... |
Ladislav 19-Jan-2011 [5339x3] | that may not help, I probably have a bit newer code |
or, maybe I use a different system | |
But Cyphre might be able to reproduce your problem once he is back | |
Pekr 19-Jan-2011 [5342x2] | I redownloaded everything. Still the same ... |
the culprit is set-panel-content -> insert-panel-content -> parse panel .... imo :-) I'll wait for newer code containing some fixes ... | |
Robert 19-Jan-2011 [5344] | stackoverflow: We are taking care of this with Carl at the moment. We have a test-case where I can reproduce the problem. |
Pekr 19-Jan-2011 [5345x2] | Carl? Nice. The culprit is the following code, which is simply wrong: show-native: :show show: funct [gob] [ update-subgobs gob show-native gob ] |
show-native calls show = itself ... strange indeed, as It does not crash with first viewing of the window, but at the second viewing. Do you think the problem is low level? | |
Ladislav 19-Jan-2011 [5347] | simply wrong - why do you think? |
Robert 19-Jan-2011 [5348] | This is the code: code: view [ title "Opinion Survey" text "Do you want programs to be easy to build?" hpanel 2 [ label "Answer:" hgroup [ radio "Agree" radio "Disagree" radio "Not sure" ] pad check "I'm a programmer." pad check "I am also a REBOL expert." label "Name:" field label "Comment:" area ] hgroup [ button "Submit" submit http://www.rebol.net/cgi/submit.r button "Reset" reset button "Cancel" close ] ] loop 10 [ do code ] print "all code passed - no crashes" halt |
Ladislav 19-Jan-2011 [5349x2] | all code passed - no crashes |
regarding the above Show-native issue - that is a do-once-only-code, as I see it. If you run it only once in the console, you don't get any stack overflow | |
Pekr 19-Jan-2011 [5351] | aha, you see? my wrong understanding :-) I thought calling such a show causes infinite loop :-) |
Ladislav 19-Jan-2011 [5352x5] | But, sure, that should be corrected to not cause any trouble if somebody inadvertently runs the code twice |
as a temporary measure, you could replace the show-native: :show by unless any-function? :show-native [show-native: :show] | |
...or if command? :show [show-native: :show] | |
Robert, does that cure the problem for you? | |
How about you, Pekr? | |
Robert 19-Jan-2011 [5357] | Lad, sorry, what should I change where? |
Ladislav 19-Jan-2011 [5358] | I posted the changed version of code to our SVN depository |
Robert 19-Jan-2011 [5359] | Ah, ok. |
Ladislav 19-Jan-2011 [5360] | (since I was unable to reproduce the problem, I bet it is exactly because I never ran the LOAD-GUI twice) |
Robert 19-Jan-2011 [5361] | Works. Differently from handling but works. |
Pekr 19-Jan-2011 [5362] | It works. But it was not enough to just change the view-show.r3 code, and call it after do %r3-gui.r3, as the initial redirection will remain. A bit tricky, as there is no script to build new r3-gui.r3 from sources, and sources are collapsed, but I managed it to change :-) |
Ladislav 19-Jan-2011 [5363x2] | well, the next update will cure this issue for everyone, this was just for checking |
thanks | |
Pekr 19-Jan-2011 [5365] | Is it possible some styles are not adapted well to resizing? When I removed 'when style, the space at the top of the panel is not there anymore. Then I removed clicker too, upon your suggestion. But - when I lower the size of the window, the display is still corrupted ... |
Ladislav 19-Jan-2011 [5366x2] | Sure |
(meant for the "not adapted") | |
Pekr 19-Jan-2011 [5368x2] | Aha ... and is there any list of "should work well" styles? |
Resizing problem reduced down to button plus text: http://xidys.com/pekr/rebol/messy-resizing2.jpg | |
Ladislav 19-Jan-2011 [5370] | thanks |
Pekr 19-Jan-2011 [5371] | To get that, you need to try xy times. Most of the time I am holding down the bottom-right corner, moving randomly the mouse (I remember REBOL in the past did not receive updated info about about size, unless mouse button is released), and it accidentally can end like that. Dunno if any such info is helpfull ... |
Maxim 19-Jan-2011 [5372x2] | I really would like it if Carl could fix the event port so that it lets all resize events go to the even handlers. right now, the graphics code has access to it, (because you can see the AGG gobs refresh when the window resizing) but the REBOL event handlers receive only the last resize event. which means we cannot resize the view while its being dragged. |
by resize the view, I mean refresh the layout iteslf. | |
Pekr 19-Jan-2011 [5374x2] | I really would like it if Carl could fix the event port so that it lets all resize events go to the even handlers. - that is long time problem, even for R2? |
I am for the fix, as it really looks ugly as it is .... | |
Maxim 19-Jan-2011 [5376x2] | yep. but in R3, I can actually see that the window resize events are being triggered while we drag the window size.. but for some reason they are not being pushed to the handler. |
in R2 its pretty weird. the event handler *accumulates* all resize events and then when you release the resize bar... it sends all of them to the handler in one stream.... just totally not at the right time ;-) | |
Pekr 19-Jan-2011 [5378] | but for some reason they are not being pushed to the handler. - is that the mezzanine level, or low level? If the fix is easy, I am all for it. I just think that it might not be the priority. The question is, if the resizing is not confused by receiving wrong info, when holding the mouse button down, resizing here and there, and then releasing it :-) |
older newer | first last |