UIPainter.st
changeset 1442 ed108e53c783
parent 1439 540781421bbf
child 1444 fec7424dccda
equal deleted inserted replaced
1441:36916e4ce9ab 1442:ed108e53c783
  3577     "starts the application on the editing window spec"
  3577     "starts the application on the editing window spec"
  3578 
  3578 
  3579     |cls application|
  3579     |cls application|
  3580 
  3580 
  3581     self hasSpecClassAndSelector ifFalse:[
  3581     self hasSpecClassAndSelector ifFalse:[
  3582 	self doSave isNil ifTrue: [^nil].
  3582         self doSave isNil ifTrue: [^nil].
  3583     ] ifTrue: [
  3583     ] ifTrue: [
  3584 	self askForSectionModification.    
  3584         self askForSectionModification.    
  3585 	(modified or: [self painter isModified or: [self helpTool modified]])
  3585         (modified or: [self painter isModified or: [self helpTool modified]])
  3586 	ifTrue:
  3586         ifTrue:
  3587 	[
  3587         [
  3588 	    ((YesNoBox title:'Window Spec was modified!!')        
  3588             ((YesNoBox title:'Window Spec was modified!!')        
  3589 		noText:'Cancel';
  3589                 noText:'Cancel';
  3590 		yesText:'Save it and start';
  3590                 yesText:'Save it and start';
  3591 		showAtPointer;
  3591                 showAtPointer;
  3592 		accepted) ifFalse: [^nil].
  3592                 accepted) ifFalse: [^nil].
  3593 	    self doSave isNil ifTrue: [^nil]
  3593             self doSave isNil ifTrue: [^nil]
  3594 	]
  3594         ]
  3595     ].
  3595     ].
  3596 
  3596 
  3597     cls := self resolveName:specClass.
  3597     cls := self resolveName:specClass.
  3598     cls isNil ifTrue:[
  3598     cls isNil ifTrue:[
  3599 	self warn:'Oops cannot start application - no class:' , specClass.
  3599         self warn:'Oops cannot start application - no class:' , specClass.
  3600 	^ nil
  3600         ^ nil
  3601     ].
  3601     ].
  3602     ((application := cls new) respondsTo:#openInterface:) ifFalse:[
  3602     ((application := cls new) respondsTo:#openInterface:) ifFalse:[
  3603         ^ self warn:('The application does not respond to the ''openInterface:'' message.\\(maybe the spec is supposed to be used as subApplication/subCanvas)') withCRs.
  3603         (self confirm:('The application does not respond to the ''openInterface:'' message.\(maybe the spec is supposed to be used as subApplication/subCanvas)\\Shall I try to open this as a standAlone dialog ?') withCRs)
       
  3604         ifTrue:[
       
  3605             SimpleDialog new openSpec:(cls perform:specSelector) withBindings:nil.
       
  3606         ].
       
  3607         ^ self.
  3604     ].        
  3608     ].        
  3605     application openInterface:specSelector
  3609     application openInterface:specSelector
  3606 !
  3610 !
  3607 
  3611 
  3608 doStepDown
  3612 doStepDown