changed:
#doSave
#loadFromClass:
care for undefined class
(encountered when editing a spec of a non-appmodel class)
--- 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: