'From Squeak3.7-m17n of 21 July 2004 [latest update: #19] on 25 July 2004 at 3:48:07 pm'! "Change Set: e08UniqueNames-sw Date: 5 July 2004 Author: Scott Wallace Restores a behavior that got lost somewhere along the way, that supplies unique names for objects launched from a parts bin. Thus, if one obtains a first Ellipse it may be called Ellipse, but the next one would then be called Ellipse1, etc. Previously published to Squeakland as update 0217uniqueNames-sw.cs. sw 7/22/2004 19:00 - vetted for publication, without change, to 3.8a/m17n/squeakland."! !Object methodsFor: 'user interface' stamp: 'sw 6/17/2004 01:47'! launchPartVia: aSelector label: aString "Obtain a morph by sending aSelector to self, and attach it to the morphic hand. This provides a general protocol for parts bins" | aMorph | aMorph _ self perform: aSelector. aMorph setNameTo: (ActiveWorld unusedMorphNameLike: aString). aMorph setProperty: #beFullyVisibleAfterDrop toValue: true. aMorph openInHand! ! !PasteUpMorph methodsFor: 'name' stamp: 'sw 6/17/2004 01:46'! unusedMorphNameLike: stem "Answer a suitable name for a morph in this world, based on the stem provided" | names | names _ self allKnownNames. ^ Utilities keyLike: stem asString satisfying: [:aName | (names includes: aName) not]! ! !StickyPadMorph class methodsFor: 'parts bin' stamp: 'sw 7/5/2004 18:09'! launchPartVia: aSelector label: aString "Obtain a morph by sending aSelector to self, and attach it to the morphic hand. This provides a general protocol for parts bins. Overridden here so that all instances will be given the name, unlike the prevailing convention for other object types" | aMorph | aMorph _ self perform: aSelector. aMorph setNameTo: self defaultNameStemForInstances. "i.e., circumvent uniqueness in this case" aMorph setProperty: #beFullyVisibleAfterDrop toValue: true. aMorph openInHand! ! !StickyPadMorph class reorganize! ('parts bin' defaultNameStemForInstances descriptionForPartsBin launchPartVia:label:) ('class initialization' initialize) ('as yet unclassified' registerInFlapsRegistry) !