TabListEditor.st
changeset 1245 fd0127c25b66
parent 1183 ee9956e2689b
child 1325 a7c38b60f2fb
equal deleted inserted replaced
1244:fd44af858001 1245:fd0127c25b66
  1189 !
  1189 !
  1190 
  1190 
  1191 doSave
  1191 doSave
  1192     "generate code for class and instance
  1192     "generate code for class and instance
  1193     "
  1193     "
  1194     |cls code spec category mthd|
  1194     |cls code spec category mthd list|
  1195 
  1195 
  1196     (specClass notNil and:[specSelector notNil])
  1196     (specClass notNil and:[specSelector notNil])
  1197     ifFalse:
  1197     ifFalse:
  1198     [
  1198     [
  1199         ^self doSaveAs
  1199         ^self doSaveAs
  1202     cls := self resolveName: specClass.
  1202     cls := self resolveName: specClass.
  1203 
  1203 
  1204     listOfTabs isEmpty ifTrue:[^self information:'No tab list defined!!'].
  1204     listOfTabs isEmpty ifTrue:[^self information:'No tab list defined!!'].
  1205 
  1205 
  1206     spec  := WriteStream on:String new.
  1206     spec  := WriteStream on:String new.
  1207     UISpecification prettyPrintSpecArray:(listOfTabs literalArrayEncoding) on:spec indent:5.
  1207     list := Array new:(listOfTabs size).
       
  1208     listOfTabs keysAndValuesDo:[:i :el|list at:i put:(el literalArrayEncoding)].
       
  1209 
       
  1210     UISpecification prettyPrintSpecArray:list on:spec indent:5.
  1208     spec := spec contents.
  1211     spec := spec contents.
  1209 
  1212 
  1210     "/ if that method already exists, do not overwrite the category
  1213     "/ if that method already exists, do not overwrite the category
  1211 
  1214 
  1212     category := 'list specs'.
  1215     category := 'list specs'.