newbie question: "reverse engineering" a Morph
Andreas Raab
andreas.raab at gmx.de
Tue Jun 24 18:33:37 UTC 2003
Hi John,
The short answer is: You can't do this in Squeak as it is. "Reverse
engineering a Morph" as code is (in many ways) just another way of storing
an object (just like a morph on a file) but this path has not been pursued
in Squeak - mostly because for the general case it is very slow and results
in very large files.
The one thing I'm really curious about is - why do you want to do this? The
only reason I can see is that then there's a "human readable form" (instead
of just bits) but this form isn't very nice to look at. So if you think that
this would be a good way for someone else to modify the morph in "text form"
I think you're completely wrong - while the result may be human readable I'm
pretty certain it's not going to be "human understandable".
Cheers,
- Andreas
> -----Original Message-----
> From: squeak-dev-bounces at lists.squeakfoundation.org
> [mailto:squeak-dev-bounces at lists.squeakfoundation.org] On
> Behalf Of John Voiklis
> Sent: Tuesday, June 24, 2003 6:38 PM
> To: squeak-dev at lists.squeakfoundation.org
> Subject: newbie question: "reverse engineering" a Morph
>
>
> Hello,
>
> To a great extent this question is wrong-headed, but I
> thought it worth
> asking, nonetheless.
>
> I have made, through direct manipulation, a rather complex
> active essay
> (using BookMorph), full of scripts and the like. For reasons
> that may only
> make sense to me, I do not want to share the morph as a .morph file or
> project; rather, I want to make it a subclass of BookMorph, let's say
> JohnsEssayBookMorph, with methods that will recreate the essay and its
> scripts.
>
> Is it possible to do this without opening up a browser and
> hand-coding it,
> or, at least, are there any shortcuts? I tried using "make
> own subclass" and
> "save morph as prototype" from the debug halo handle. That
> sort of worked,
> but it did not generate any code that I could fileout and share.
>
> Thanks for any help.
>
> Best,
>
> John
>
>
More information about the Squeak-dev
mailing list
|