# HG changeset patch # User Claus Gittinger # Date 1350994363 -7200 # Node ID c01fe2833468d63d70cda8109eee880a4fb107c5 # Parent a4f4d63953b33503f0495837e86199446223719b changed: #doSave #loadFromClass: care for undefined class (encountered when editing a spec of a non-appmodel class) diff -r a4f4d63953b3 -r c01fe2833468 UIHelpTool.st --- a/UIHelpTool.st Thu Oct 18 13:10:18 2012 +0200 +++ b/UIHelpTool.st Tue Oct 23 14:12:43 2012 +0200 @@ -713,6 +713,10 @@ " |lastContents root list helpSpecSelector| + (specClass notNil and:[specClass == aClass]) ifTrue:[ + ^ self. + ]. + helpSpecSelector := self specSelector. specClass := self getHelpSpecClassFromClass:aClass. @@ -1120,7 +1124,10 @@ "/ ^ nil "/ ]. - classItemList do:[:aClassItem| + classItemList do:[:aClassItem| + aClassItem theClass isNil ifTrue:[ + aClassItem onClass:specClass + ]. aClassItem createHelpMethodNamed:(self specSelector) ]. ! @@ -1177,9 +1184,15 @@ createHelpMethodNamed:aMethodName |stream| - (modified and:[theClass notNil]) ifFalse:[ + modified ifFalse:[ ^ self ]. + theClass isNil ifTrue:[ + theClass := Dialog requestClass:'Save helpSpec in which class?' initialAnswer:''. + theClass isNil ifTrue:[ + ^ self + ]. + ]. stream := '' writeStream. stream nextPutAll: