newStandAlone vs new

Ned Konz ned at bike-nomad.com
Sun Nov 17 17:15:37 UTC 2002


On Sunday 17 November 2002 05:20 am, Bergel Alexandre wrote:
> Hello,
>
> When should I get a new morph by sending newStandAlone to its class
> ?

This is used primarily for obtaining prototypes for manual 
manipulation (like from the browser's "hand me an instance").

As such, it tends to return a particular kind of instance intended for 
human rather than program consumption.

I'd always use a "new" method if I was building on a Morph.

As an aside, there are now several ways to get new Morphs:

* newStandAlone (from browser menus)
* new (from code)
* from the Objects tool (which calls a registered method to make 
instances)
* from a Flap (which duplicates a prototype)

and if you have Connectors loaded:
* from a NCMakerButton (which duplicates a prototype and sends it a 
message)

-- 
Ned Konz
http://bike-nomad.com
GPG key ID: BEEA7EFE




More information about the Squeak-dev mailing list