>But it'd be hard to convert everything to text form -- e.g., how do you
>convert a 24-bit pixmap to text?

Anthony,

 not a problem. Since our variables have no problem with NULL characters,
we'd just need something like the pictureData property (which returns a
long stream of bytes representing the image data) and then we'd say:

 put the pictureData of imageBeingEdited into the undoStorage

or whatever. We could prefix this with some moe info, e.g. with "PICT" to
indicate it's not a text or button, but this is how it basically works in
SC. Of course, if we have a command like CopyBits(), we can copy an image
into an image object in our "undo stack" and then copy it back, but as long
as there are enough ways to do it, we needn't care about this right now.

>Somehow I don't think the scripters care about our namespace, Uli (and
>other programmers here). But I'd suggest it would properly be a member of
>the stack class.

 But we should care about it. OK, in this case it'd probably be a feature
that'd also be used by scripters in their stacks, so it should have an
English-like name, but for debugging stuff etc, we should make sure they
don't introduce unnecessary collisions with user syntax.

>We can do it more efficiently in OC.

 The advantage of having it in the engine is mainly that it's available no
matter what the current home stack is, and it would be a bit faster; but
it'd be cooler if users could customize it. Maybe we could add both. That
is, an "undo" command that sends an "undo" message to the current card, and
if that reaches the engine, the engine handles undo in text fields and
paint tools. Most scripters won't need undo for buttons in their finished
products, which is why we could keep that xTalk. But again, we can think
about this later, as long as the engine accomodates for copy and paste, we
can easily adapt it to also support internal copy/paste.

Cheers,
-- M. Uli Kusterer

------------------------------------------------------------
             http://www.weblayout.com/witness
       'The Witnesses of TeachText are everywhere...'

--- HELP SAVE HYPERCARD: ---
Details at: http://www.hyperactivesw.com/SaveHC.html
Sign: http://www.giguere.uqam.ca/petition/hcpetition.html

Reply via email to