# HG changeset patch # User Claus Gittinger # Date 950111262 -3600 # Node ID 83fe4fae7c10add66d63c9cbe5bf4568a42030bd # Parent 4276358d937ba88aafe625bdc2370d29a2afd26a *** empty log message *** diff -r 4276358d937b -r 83fe4fae7c10 UIPainter.st --- a/UIPainter.st Wed Feb 09 16:46:51 2000 +0100 +++ b/UIPainter.st Wed Feb 09 16:47:42 2000 +0100 @@ -2372,18 +2372,22 @@ askForModification "asks for window spec modification" + |painter| + + painter := self painter. + self askForSectionModification. - (modified or: [self painter isModified or: [self helpTool modified]]) - ifTrue: - [ - ((YesNoBox title:(resources string:'Window Spec was modified !!')) - noText:(resources string:'Cancel'); - yesText:(resources string:'Forget it and proceed'); - showAtPointer; - accepted) ifFalse: [^false]. - modified := false. - self painter resetModification + + (modified or: [painter isModified or: [self helpTool modified]]) + ifTrue:[ + ((YesNoBox title:(resources string:'Window Spec was modified !!')) + noText:(resources string:'Cancel'); + yesText:(resources string:'Forget it and proceed'); + showAtPointer; + accepted) ifFalse: [^false]. + modified := false. + painter resetModification ]. ^true @@ -3458,12 +3462,12 @@ self askForSectionModification. self hasSpecClassAndSelector ifFalse:[ - self doDefineClassAndSelector isNil ifTrue: [^nil] + self doDefineClassAndSelector isNil ifTrue: [^nil] ]. (specClass notNil and: [(cls := Smalltalk at: specClass asSymbol) isClass]) ifFalse:[ - self warn:('Oops - cannot save - class not found: ' , specClass). - ^nil + self warn:('Oops - cannot save - class not found: ' , specClass). + ^nil ]. "/ specClass notNil ifTrue:[ @@ -3494,9 +3498,9 @@ painter := self painter. painter - className:specClass - superclassName:specSuperclass - selector:specSelector. + className:specClass + superclassName:specSuperclass + selector:specSelector. code := painter generateWindowSpecMethodSource withCRs. @@ -3509,12 +3513,10 @@ self updateInfoLabel. modified := false. painter resetModification. - (cls class implements: specSelector) ifTrue:[ - self addToHistory: (specClass, ' ', specSelector) -> #loadFromMessage:. + self addToHistory: (specClass, ' ', specSelector) -> #loadFromMessage:. ]. - ! doSaveAs