[REBOL] crashing Rebol/View trying to duplicate a layout
From: laurent::giroud::libertysurf::fr at: 30-Sep-2002 23:34
Hello,
while doing a few tests with VID I managed to crash Rebol.
My goal was to create a layout containing a button which once pressed would
create a new view containing the same button which pressed would... you see the
point ;)
This had no particular purposes other than fun (ahem, some kind of fun at
least).
So, I tried this :
>> view lay: layout [button "Hop" "Poh" [view/new make object! lay]]
which crashes hopelessly when pressing the button
It seems that what crashes rebol is duplicating the lay object since the code
below crashes in a similar way :
>> lay: layout [button "hop"]
>> make object! lay
**CRASH**
Since I don't know if this is a know problem I thought to ask there before
sending the bug to feedback. Is there anything wrong in trying to "make object!
lay" ? I guess that even if it was, Rebol should not crash doing so ;)
I tried to probe the lay object and it seems to never finish, so I though that
the crash might result from a very large number of recursions causing a stack
overflow...
I finally managed to get my idea to work using :
>> block: [button "hop" [view/new layout block]]
== [button "hop" [view/new layout block]]
>> view layout block
But would it be possible to duplicate the first layout instead of building a new
layout again from the block value ?
Laurent
--
Laurent Giroud mailto:[laurent--giroud--libertysurf--fr]