TabListEditor.st
changeset 3330 76129ae4dadd
parent 3118 d0e78fb8d796
child 3381 5c6ec0d1c89b
child 3630 5e718e0a754e
equal deleted inserted replaced
3329:a5fcdace63ba 3330:76129ae4dadd
       
     1 "{ Encoding: utf8 }"
       
     2 
     1 "
     3 "
     2  COPYRIGHT (c) 1997 by eXept Software AG
     4  COPYRIGHT (c) 1997 by eXept Software AG
     3               All Rights Reserved
     5               All Rights Reserved
     4 
     6 
     5  This software is furnished under a license and may be used
     7  This software is furnished under a license and may be used
     8  be provided or otherwise made available to, or used by, any
    10  be provided or otherwise made available to, or used by, any
     9  other person.  No title to or ownership of the software is
    11  other person.  No title to or ownership of the software is
    10  hereby transferred.
    12  hereby transferred.
    11 "
    13 "
    12 "{ Package: 'stx:libtool2' }"
    14 "{ Package: 'stx:libtool2' }"
       
    15 
       
    16 "{ NameSpace: Smalltalk }"
    13 
    17 
    14 ResourceSpecEditor subclass:#TabListEditor
    18 ResourceSpecEditor subclass:#TabListEditor
    15 	instanceVariableNames:'listOfTabs'
    19 	instanceVariableNames:'listOfTabs'
    16 	classVariableNames:''
    20 	classVariableNames:''
    17 	poolDictionaries:''
    21 	poolDictionaries:''
  1639 doSave
  1643 doSave
  1640     "generate code for class and instance"
  1644     "generate code for class and instance"
  1641 
  1645 
  1642     |cls code spec category package mthd list|
  1646     |cls code spec category package mthd list|
  1643 
  1647 
  1644     (specClass notNil and:[specSelector notNil])
  1648     (specClass notNil and:[specSelector notNil]) ifFalse:[
  1645     ifFalse:
  1649         ^ self doSaveAs
  1646     [
       
  1647         ^self doSaveAs
       
  1648     ].
  1650     ].
  1649 
  1651 
  1650     cls := self resolveName: specClass.
  1652     cls := self resolveName: specClass.
  1651 
  1653 
  1652     listOfTabs isEmpty ifTrue:[^self information:'No tab list defined!!'].
  1654     listOfTabs isEmpty ifTrue:[^self information:'No tab list defined!!'].
  1653 
  1655 
  1654     spec  := WriteStream on:String new.
  1656     spec  := WriteStream on:''.
  1655     list := Array new:(listOfTabs size).
  1657     list := Array new:(listOfTabs size).
  1656     listOfTabs keysAndValuesDo:[:i :el|list at:i put:(el literalArrayEncoding)].
  1658     listOfTabs keysAndValuesDo:[:i :el|list at:i put:(el literalArrayEncoding)].
  1657 
  1659 
  1658     UISpecification prettyPrintSpecArray:list on:spec indent:5.
  1660     UISpecification prettyPrintSpecArray:list on:spec indent:5.
  1659     spec := spec contents.
  1661     spec := spec contents.