From VisualWorks® NonCommercial, 7.4.1 of May 30, 2006 on November 15, 2006 at 10:54:32 am BobView Smalltalk UI.View false none My Classes BobsJunk BobsJunkyAppModel Smalltalk UI.ApplicationModel false none bobView UIApplications-New BobsJunk BobsController Smalltalk UI.ControllerWithMenu false none keyboardProcessor (none) BobsJunk BobView displaying displayOn: aGraphicsContext (Circle center: 100 @ 100 radius: 50) displayStrokedOn: aGraphicsContext. (Circle center: 150 @ 150 radius: 30) displayFilledOn: aGraphicsContext. BobView initialize-release initialize "Initialize a newly created instance. This method must answer the receiver." super initialize. " *** Replace this comment with the appropriate initialization code *** " ^self BobView accessing defaultControllerClass ^BobsController BobsJunkyAppModel class resources mainMenu "Tools.MenuEditor new openOnClass: self andSelector: #mainMenu" <resource: #menu> ^#(#{UI.Menu} #( #(#{UI.MenuItem} #rawLabel: 'File' #submenu: #(#{UI.Menu} #( #(#{UI.MenuItem} #rawLabel: 'New' #nameKey: #new #value: #new ) #(#{UI.MenuItem} #rawLabel: 'Open' #nameKey: #open #value: #open ) #(#{UI.MenuItem} #rawLabel: 'Exit' #nameKey: #exit #value: #exit ) ) #(2 1 ) nil ) ) ) #(1 ) nil ) decodeAsLiteralArray BobsJunkyAppModel class interface specs windowSpec "Tools.UIPainter new openOnClass: self andSelector: #windowSpec" <resource: #canvas> ^#(#{UI.FullSpec} #window: #(#{UI.WindowSpec} #label: 'BobsJunkyViewDraw' #bounds: #(#{Graphics.Rectangle} 319 239 700 490 ) #flags: 4 #menu: #mainMenu ) #component: #(#{UI.SpecCollection} #collection: #( #(#{UI.ArbitraryComponentSpec} #layout: #(#{Graphics.Rectangle} 8 5 378 246 ) #name: #ViewHolder1 #component: #bobView ) ) ) ) BobsJunkyAppModel initialize-release initialize super initialize. bobView := BobView new. bobView model: self. BobsJunkyAppModel accessing bobView ^bobView BobsJunkyAppModel actions new Transcript show: 'Called new' ; cr. BobsController events keyPressedEvent: anEvent Transcript show: 'Pressed a key' ; cr. redButtonPressedEvent: anEvent Transcript show: 'Pressed a mouse button' ; cr. BobsController initialize-release initialize "Initialize a newly created instance. This method must answer the receiver." super initialize. " *** Replace this comment with the appropriate initialization code *** " ^self BobsController accessing keyboardProcessor: aProcessor keyboardProcessor := aProcessor keyboardProcessor ^keyboardProcessor desiresFocus ^true