[BUG] ColorPickerMorph

Stephane Ducasse ducasse at iam.unibe.ch
Sat Jul 19 19:23:59 UTC 2003


Hi ned


On Saturday, July 19, 2003, at 09:09 PM, Ned Konz wrote:

> On Saturday 19 July 2003 11:32 am, Stephane Ducasse wrote:
>> Hi ned
>>
>> This is the sign that the client interface creation of this class
>> is not really good
>> then. Either it should provide a good interface or it should break
>> directly at creation time.
>>
>> This also reminds me that having automatic initialize methods
>> invoked would be really a step in the future (even if CLOS got that
>> now nearly 15 ago at least #Smalltalk has it).
>
> Well, "new" isn't (always) the idiom for getting fully-usable Morphs.

Yes I started to make the mistake long time ago and Scott told me to 
use newStandAlone (which calls initializeToStandAlone) for Morph that 
should can be standing alone  and I used that consistently for my 
second book (if one day we finish it else it will be available on the 
web). But this is true that this is not trivial. At least your summary 
it good and I'm not sure a lot of people knows that.

Stef

>
> And there are some morphs that aren't really usable by themselves,
> though one could wire them up for testing.
>
> If you look at the return value of #includeInNewMorphMenu you will see
> whether a particular class doesn't want to be instantiated from that
> menu. Also, the classes in 'Morphic-Menus' and 'Morphic-Support'
> don't show up in that list.
>
> I'd argue that #newStandAlone should work for all Morph classes that
> could conceivably be instantiated by themselves. Which leaves the
> question open of how to mark or otherwise handle classes that can't
> do this.
>
> We have (in addition to #new):
>
> * #wantsToBeOpenedInWorld (open in world vs. in hand from New Morph
> menu)
> * #installModelIn: (called by some clients but not others)
> * #initializedInstance (called by the "sample instance" menu choice)
> * #newStandAlone (which is called by #initializedInstance if it's
> defined) (which then calls #initializeToStandAlone)
> * #authoringPrototype (which is called when a Morph is put in a flap)
> * #descriptionForPartsBin and #supplementaryPartsDescriptions (used
> for the Objects tool)
>
> -- 
> Ned Konz
> http://bike-nomad.com
> GPG key ID: BEEA7EFE
>
>



More information about the Squeak-dev mailing list