[FIX] Morph >> debuggingMenuFor:

Jason McVay jmcvay at bigfoot.com
Sun Sep 5 05:23:10 UTC 1999


hey all--

this is my first contribution. it fixes a small bug that would give you an
error if you tried to 'make own subclass' from the debug halo...

jason


'From Squeak 2.5 of August 6, 1999 on 5 September 1999 at 12:17:29 am'!

!Morph methodsFor: 'debug and other' stamp: 'JLM 8/27/1999 01:32'!
debuggingMenuFor: aHandMorph
 | aMenu aPlayer |
 aMenu _ MenuMorph new defaultTarget: self.
 (self hasProperty: #errorOnDraw) ifTrue:
  [aMenu add: 'start drawing again' action: #resumeAfterDrawError.
  aMenu addLine].
 (self hasProperty: #errorOnStep) ifTrue:
  [aMenu add: 'start stepping again' action: #resumeAfterStepError.
  aMenu addLine].
 aMenu add: 'control-menu...' target: aHandMorph selector:
#invokeMetaMenuFor: argument: self.
 aMenu add: 'inspect morph' action: #inspectInMorphic.
 Smalltalk isMorphic ifFalse:
  [aMenu add: 'inspect morph (in MVC)' action: #inspectArgument].

     aMenu add: 'explore morph' target: aHandMorph selector:
#exploreArgument.
 aMenu add: 'browse morph class' target: aHandMorph selector:
#browseMorphClassFor: argument: self.

 (aPlayer _ self player) ifNotNil:
  [aMenu add: 'inspect player' target: aPlayer action: #inspect.
  World ifNil: [aMenu add: 'inspect player (morphic)' action:
#inspectArgumentsPlayerInMorphic].
  aMenu add: 'browse player class' target: aPlayer action: #inspect].

 aMenu add: 'make own subclass' target: aHandMorph selector: #subclassMorph.
 aMenu add: 'internal name ' action: #choosePartName.
 aMenu add: 'save morph in file'  action: #saveOnFile.
 aMenu addLine.
 aMenu add: 'call #tempCommand' target: aHandMorph action: #callTempCommand.
 aMenu add: 'define #tempCommand' target: aHandMorph action:
#defineTempCommand.

 aMenu addLine.
 aMenu add: 'edit balloon help' action: #editBalloonHelpText.
 ^ aMenu! !





More information about the Squeak-dev mailing list