UIHelpTool.st
changeset 393 a824a3a9b834
parent 369 9d34f1ff4d29
child 454 8b016ffd83ce
equal deleted inserted replaced
392:53a63b0e8279 393:a824a3a9b834
   399 !UIHelpTool methodsFor:'actions'!
   399 !UIHelpTool methodsFor:'actions'!
   400 
   400 
   401 accept
   401 accept
   402     "accept the text
   402     "accept the text
   403     "
   403     "
   404     |view key txt list|
   404     |view key txt list listChgd|
   405 
   405 
   406     (listSelection size == 0 or:[(view := self editTextView) isNil]) ifFalse:[
   406     (listSelection size == 0 or:[(view := self editTextView) isNil]) ifFalse:[
   407         txt  := view contents asString.
   407         txt    := view contents asString.
   408         key  := listSelection asSymbol.
   408         key    := listSelection asSymbol.
   409         list := self listChannel value.
   409         list   := self listChannel value.
   410 
   410 
   411         (dictionary at:key ifAbsent:nil) isNil ifTrue:[
   411         (listChgd := (dictionary at:key ifAbsent:nil) isNil) ifTrue:[
   412             list add:key.
   412             list add:key.
   413         ].
   413         ].
   414         dictionary at:key put:txt.
   414         dictionary at:key put:txt.
   415         isModified := true.
   415         isModified := true.
       
   416 
       
   417         listChgd ifTrue:[
       
   418             self updateList
       
   419         ]
   416     ]
   420     ]
   417 !
   421 !
   418 
   422 
   419 installHelpSpecInto:aClass
   423 installHelpSpecInto:aClass
   420     "install help text
   424     "install help text