UIPainter.st
changeset 1185 6c14008722e9
parent 1180 97444c115c14
child 1186 4cea2d4e9dbc
equal deleted inserted replaced
1184:c67bdfe67afd 1185:6c14008722e9
  2774 	].
  2774 	].
  2775 	topView raise.
  2775 	topView raise.
  2776     ].
  2776     ].
  2777 !
  2777 !
  2778 
  2778 
  2779 loadFromMessage: aMessage
  2779 loadFromMessage: aMessageString
  2780     "loads a window spec by evaluating aMessage"
  2780     "loads a window spec by evaluating aMessageString
  2781 
  2781      (which is something like 'fooClass windowSpec')"
  2782     ((aMessage size > 0) and: [self askForModification])
  2782 
  2783     ifTrue:
  2783     |readStream aClass aSelector|
  2784     [
  2784 
  2785 	|readStream aClass aSelector|
  2785     ((aMessageString size > 0) and: [self askForModification])
  2786 	readStream := aMessage readStream.
  2786     ifTrue:[
  2787 	(aClass := Smalltalk at: (readStream upTo: $ ) asSymbol) notNil
  2787         readStream := aMessageString readStream.
  2788 	ifTrue:
  2788         (aClass := Smalltalk at: (readStream upTo: $ ) asSymbol) notNil
  2789 	[
  2789         ifTrue:[
  2790 	    aSelector :=  readStream upToEnd asSymbol.
  2790             aSelector :=  readStream upToEnd asSymbol.
  2791 	    self setClass: aClass selector: aSelector.    
  2791             self setClass: aClass selector: aSelector.    
  2792 	    (aClass respondsTo:aSelector) 
  2792             (aClass respondsTo:aSelector) ifTrue:[   
  2793 	    ifTrue:
  2793                 self painter setupFromSpec:(aClass perform:aSelector)
  2794 	    [   
  2794             ]
  2795 		self painter setupFromSpec:(aClass perform:aSelector)
  2795         ]
  2796 	    ]
       
  2797 	]
       
  2798     ]
  2796     ]
  2799 !
  2797 !
  2800 
  2798 
  2801 openInterface:aSymbol
  2799 openInterface:aSymbol
  2802     "opens the interface on the selector aSymbol"
  2800     "opens the interface on the selector aSymbol"
  3449     cls isNil ifTrue:[
  3447     cls isNil ifTrue:[
  3450         self warn:'Oops cannot start application - no class:' , specClass.
  3448         self warn:'Oops cannot start application - no class:' , specClass.
  3451         ^ nil
  3449         ^ nil
  3452     ].
  3450     ].
  3453     ((application := cls new) respondsTo:#openInterface:) ifFalse:[
  3451     ((application := cls new) respondsTo:#openInterface:) ifFalse:[
  3454         ^ self warn:('The application does not respond to the ''openInterface:'' message.\\(maybe its supposed to be used as subApplication/subCanvas)') withCRs.
  3452         ^ self warn:('The application does not respond to the ''openInterface:'' message.\\(maybe the spec is supposed to be used as subApplication/subCanvas)') withCRs.
  3455     ].        
  3453     ].        
  3456     application openInterface:specSelector
  3454     application openInterface:specSelector
  3457 !
  3455 !
  3458 
  3456 
  3459 doStepDown
  3457 doStepDown