Please review this simple rebol2 code to illustrate my problem:
REBOL [] a: make face [ offset: 0x0 color: yellow size: 20x20 ] b: make face [ offset: 0x0 color: red size: 60x60 pane: reduce [ make a [offset: 0x0] make a [offset: 10x10] make a [offset: 10x20] ] ] view layout [ box 200x200 white with [ pane: reduce [ make b [offset: 0x30] ;; one 'instance' of b ] ] ]
The main point here is that the layout (or face) can display a bunch of faces inside its panel block so that it is possible to create several creations of the same side ( b in this case), the code shown works well, and the only instance (let me call it that way) b displayed as it should be.
But now suppose I change the code, so I have, say, 2 instances of b :
view layout [ box 200x200 white with [ pane: reduce [ make b [offset: 0x30] make b [offset: 0x10] ] ] ]
At this moment I get an error
** Script Error: Face object reused (in more than one pane): none ** Where: view ** Near: show scr-face if new [do-events]
From the message that I am suggesting here that face b somehow reused and claimed by exactly what I am trying to achieve. I did a lot of research on this, and at some point I found that you could get around it by cloning (using make ) the face that should be passed to pane ; what I thought I was doing, but did not succeed at all.
Given this scenario, my question is: how can I solve this? is it rebol2 ok to provide this βface creationβ or is it better to try something else outside of rebol2 (possibly rebol3)?
Any help would be greatly appreciated.
source share