[ENH] or [FIX] Morphs initialization doubled

Oca Emilio eoca at afip.gov.ar
Mon May 6 14:55:49 UTC 2002


Wallace,

May I call you Scott? :o)

Items (1), (2) and (3) apply to me.
I' m working on my thesis and have a morph that is something like a control
panel. As I crash it very often I've stolen the 'sample instance' option of
the shift menu and put it on my desk as a button. The same with others
options like 'find window' and 'file out (o)'.

> Thanks for finding this!
No, I'm glad to colaborate. Thank you all for building up this community.
Squeak is a place, full of objects... and people.

Cheers.

	Emilio


> Oca,
> 
> Yes, you are correct.  Your fix has now been published (to the 
> internal servers) as update 4858initInstFix-efo.
> 
> Reasons this bug did not attract notice before:
> 
> (1) It only arose when the little-known "sample instance" menu item 
> was used to get a new morph.  This item is buried in the "more..." 
> (shifted) menu that you find in class-list menus and message-list 
> menus in the various code tools.
> 
> "Sample instance" provides a way to get a morph "directly from a 
> browser."   If you are looking at the code of some morph class in a 
> browser, you can directly launch a sample instance so you can have a 
> live object to accompany your code exploration.  For example, you can 
> then immediately open an Inspector on the object, and use its bottom 
> pane to send it some of the actual messages you're looking at.
> 
> 
> (2) It only arose when the sample-instance requested was for a morph 
> subclass that had not "registered".  That would make it either a 
> morph type not capable of standing on its own, or else a morph class 
> that had not yet caught up with the need to implement the one method 
> that it takes to make it a "citizen" of the population of launchable 
> morphs.  (There are rather few such laggards remaining -- and anyone 
> who finds one can serve the common good here by implementing and 
> contributing a #descriptionForPartsBin method for it.)
> 
> 
> (3) And it would only be *noticeable* if having #initialize called 
> twice on the nascent instance had a perceptibly different effect from 
> calling it once.  Most likely something like a halt or a write to the 
> Transcript that was temporarily put into an #initialize method, I 
> would guess.
> 
> Thanks for finding this!
> 
>    -- Scott
> 



More information about the Squeak-dev mailing list