I give up on print in writer.slate

Brian T Rice water at tunes.org
Mon Jun 2 18:46:31 PDT 2003


On Tue, 3 Jun 2003, Paul Dufresne wrote:

> I have a problem in writer.slate about print of roles of MethodNode. It
> try to put roles statements inside an ArrayNode statements, then print
> it. Printing ArrayNode is based on the fact that an ArrayNode is a
> CompoundStatementNode. That is, ArrayNode resend, to print it's
> contents.
>
> But as soon I try to add roles statements in ArrayNode statements, the
> ArrayNode stop to be a CompoundStatementNode, so that the resend in
> ArrayNode, call itself, filling the stack.

So, either (1) set the statements slot to an Array of a size that you know
will be needed, and use at:put: to set the statements, or (2) use an
ExtensibleSequence if you really need to add:.

> Normally, ArrayNode statements is {}. Someone able to copy roles in the
> ArrayNode while keeping it a CompoundStatementNode?

I'm not entirely sure I follow what you mean about "copying". Hopefully
the above options work for you.

-- 
Brian T. Rice
LOGOS Research and Development
http://tunes.org/~water/



More information about the Slate mailing list