Page 1 of 1

RePieces Loosing Fliped Side when cut/paste

PostPosted: June 3rd, 2008, 1:16 am
by Brent Easton
Hi Michael,

It sounds like you have designed the importer to generate a module that will act pretty much as the ordiginal ADC2 module did.

But now, someone has decided that they would now like to modify the generated module to make it 'better', but the generated module is not easy to change.

Just an idea, but I would have handled this by building the 'flip unit' in a prototype and then reference the protoype directly in the 'Replace with Other' definition (ie, Just a BasicPiece with no image and a prototype definition). You will then not have a reference to any units in the palette and the designer could move units at will. You could also add a standard unit to the palette using the same prototype, but it would be independent of the 'Replace' definition.


*********** REPLY SEPARATOR ***********

On 2/06/2008 at 10:01 PM Michael Kiefte wrote:
> > Can you detect at import-time which pieces can be "flipped" to other
pieces? If you can, and there are no pieces which have a combination
of real flips and "flips", then you could import the "flips" as
a "Replace with Other" trait.

It is actually a "Replace with Other" trait. However, you have to give it a
reference to the Other.

"a reference to the Other" sounds like something from critical theory. Heh.

Is it not possible to find the Other to which to refer?

The Replace with Other trait is in The constructor for the Replace object requires a path to the replacing piece which just happens to be in the default ListWidget. If you mess around with the contents of that ListWidget, you're screwed. What you would have to do is go through all the pieces and reset the flip definition.

The reason why I don't just create the pieces on the fly is that they're, more often than not, reciprocal. Since they all sit in the default ListWidget, it seemed the perfect place to reference the replacement, but it hadn't occured to me that someone may want to mess with the list.

Here's what I would do: don't mess with the original list: create a new one. If the old one is still there, you should be fine.

- M.

Post generated using Mail2Forum (

RePieces Loosing Fliped Side when cut/paste

PostPosted: June 3rd, 2008, 11:12 am
by Brent Easton
Where would the prototype go? It has to be in the property tree somewhere.

'Replace' and R'eplace WIth Other' have two modes of referencing the counter to be generated.:

1. Reference another counther in the configure tree somewhere
2. Contain a full counter construction with a list of traits etc.

I'm suggesting using method 2, built with a prototype, instead of method 1.


Messages mailing list ...

Post generated using Mail2Forum (