[General] Redefining the Class of Instantiated Morphs, Subclassing Instantiated Morphs on the Fly

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[General] Redefining the Class of Instantiated Morphs, Subclassing Instantiated Morphs on the Fly

Philip Weaver
As I work with Lively, I am primarily creating widgets as classes. However
any of these widgets could have been laid out directly in the world using
the existing morph primitives. The reason I did not do this is because 1. I
have not found a way to convert a morph composite to a class 2. nor have I
found a way to serialize and deserialize the morphs of a singular widget to
be used with a class. So I will continue to build widgets as classes and
then interact with them as entities via script evals. A significant
distinction appears to exist in Lively between writing classes in the ide
and interacting with objects using the inspector. I regret that I am not
very familiar with Squeak and Smalltalk.
I wish I could click on an instantiated morph and select either "New
subclass" (even "Change class"). The Lively ide then creates a new subclass
and the morph composite is either 1. constructed by deserialization (think
interface builder and nib files) or 2. the necessary code is generated in
the initializer to reconstruct the child morphs. Please let me know if any
of this is currently possible. If not I'm sure soon it can be. :-)

Phil
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://livelykernel.sunlabs.com/pipermail/general/attachments/20090228/e5b04f51/attachment.html 


Reply | Threaded
Open this post in threaded view
|

Re: [General] Redefining the Class of Instantiated Morphs, Subclassing Instantiated Morphs on the Fly

Sean P. DeNigris
Administrator
Philip Weaver wrote
A significant distinction appears to exist in Lively between writing classes in the ide and interacting with objects using the inspector… I wish I could click on an instantiated morph and select either "New
subclass" (even "Change class")
Bump… this is an important topic. How does one generalize from visually created prototypes. For instance, you create a morph, then make copies, but realize that all the copies should have an additional property or script; how does one avoid adding it individually to each individual morph?
Cheers,
Sean