I've said on a comment that I would get back to share my findings and I think I got something interesting. I'm not all sure why it is needed.įinally the everything could elegantly be solved with style view layout [Īt 0x0 a we can in this style use the just defined a style Note that init is manually called within the make clause in this case. The other alternative, a bit more similar to your would be: b: make face [ In this case I would be using the style command in layout (still partially using face object a ) view layout [
As I understand it init is first bound to the face and then called with do after the face itself is instantiated (at least partially). The layout function uses a field called init for handling things like this. Given this scenario, my question is: how can I go about to solve this? is rebol2 ok to provide this "face-instantiation" or it is best to try something else outside rebol2 (perhaps rebol3)?Īs is already pointed out the problem is that a is reused, not b! I've done lots of research on this and at some point I found that it is possible to get around it by cloning (using make) the face to be passed to pane that's what I thought I was doing, but with no success at all.
#OFFSET FATHER OF 4 500X500 CODE#
The shown code works well, and the only instance (let me call it this way) of b is displayed as it should be.īut now suppose I change the code so I have, say, 2 instances of b: view layout [Īt this point I get the error ** Script Error: Face object reused (in more than one pane): noneįrom the message I presume here that face b is somehow getting reused and messing exactly what I'm trying to achieve. The main point here is for a layout (or face) to be able to display a bunch of faces inside its pane block in such a manner that multiple creations of the same face ( b in this case) should be possible. Please consider this simple rebol2 code to illustrate my problem: REBOL