'From etoys3.0 of 28 February 2008 [latest update: #1955] on 1 April 2008 at 3:24:59 pm'! "Change Set: phraseExpandFix-sw Date: 1 April 2008 Author: Scott Wallace Fix for: TRAC 6807 Auto-phrase-expansion flag not honored on phrase drop."! !PhraseTileMorph methodsFor: 'dropping/grabbing' stamp: 'sw 4/1/2008 15:15'! morphToDropInPasteUp: aPasteUp "Answer the morph to drop in aPasteUp, given that the receiver is the putative droppee" | actualObject itsSelector aScriptor pos aWatcher op | ((actualObject _ self actualObject) isNil or: [actualObject isPlayerLike not] or: [actualObject costume isInWorld not]) ifTrue: [^ ScriptingTileHolder around: self]. self isCommand ifFalse: "Can't expand to a scriptor, but maybe launch a watcher..." [^ (Preferences dropProducesWatcher and: [(#(unknown command) includes: self resultType) not] and: [(op _ self operatorTile operatorOrExpression) notNil] and: [op numArgs = 0] and: [(Vocabulary gettersForbiddenFromWatchers includes: op) not]) ifTrue: [aWatcher _ WatcherWrapper new fancyForPlayer: self associatedPlayer getter: op. aWatcher position: self position] ifFalse: [ScriptingTileHolder around: self]]. (aPasteUp automaticPhraseExpansion and: [self justGrabbedFromViewer]) ifFalse: [^ ScriptingTileHolder around: self]. actualObject assureUniClass. itsSelector _ self userScriptSelector. pos _ self position. aScriptor _ itsSelector isEmptyOrNil ifFalse: [actualObject scriptEditorFor: itsSelector] ifTrue: ["It's a system-defined selector; construct an anonymous scriptor around it" actualObject newScriptorAround: self]. aScriptor ifNil:[^ ScriptingTileHolder around: self]. (self hasOwner: aScriptor) ifTrue:[ aScriptor fullBounds. "force layout" aScriptor position: pos - self position. ] ifFalse:[ aScriptor position: self position. ]. (aScriptor valueOfProperty: #needsLayoutFixed) ifNotNil: [ aScriptor removeProperty: #needsLayoutFixed. aScriptor fixLayout ]. ^ aScriptor! !