UIPainter.st
changeset 3241 1fca4b63f4bf
parent 3238 04a843a6ae79
child 3251 b5188e3ab24f
equal deleted inserted replaced
3240:28a65ccd21cc 3241:1fca4b63f4bf
  3778     ]
  3778     ]
  3779 
  3779 
  3780     "Modified: / 16.7.1998 / 18:15:46 / cg"
  3780     "Modified: / 16.7.1998 / 18:15:46 / cg"
  3781 !
  3781 !
  3782 
  3782 
       
  3783 openSubSpecBrowser
       
  3784     "opens a browser on the current subspecification"
       
  3785 
       
  3786     self withSpecClassAndSelectorDo:[:cls :sel |
       
  3787         cls theMetaclass browse:sel.
       
  3788     ].
       
  3789 !
       
  3790 
  3783 openSubSpecGUIPainter
  3791 openSubSpecGUIPainter
  3784     "opens a GUI Painter on the current subspecification"
  3792     "opens a GUI Painter on the current subspecification"
       
  3793 
       
  3794     self withSpecClassAndSelectorDo:[:cls :sel |
       
  3795         self class 
       
  3796             openOnClass:cls theMetaclass soleInstance 
       
  3797             andSelector:sel.
       
  3798     ].        
       
  3799 
       
  3800     "Modified: / 5.11.2001 / 16:51:46 / cg"
       
  3801 !
       
  3802 
       
  3803 openTabListEditor
       
  3804     "opens a Tab List Editor on current widget"
       
  3805 
       
  3806     |selector editor spec cls holder|
       
  3807 
       
  3808     (cls := self resolveName:specClassName) isNil ifTrue:[
       
  3809         self askForSaving ifTrue:[cls := self resolveName:specClassName].
       
  3810     ].
       
  3811     cls isNil ifTrue:[^ self].
       
  3812 
       
  3813     self acceptOrIgnoreSectionModification.
       
  3814     spec := self specTool specification.
       
  3815 
       
  3816     (selector := spec listSelector) isArray 
       
  3817         ifTrue: [^self warn: 'Cannot open the Tab List Editor on an array!!'].
       
  3818 
       
  3819     editor := TabListEditor new.
       
  3820     editor masterApplication:self.
       
  3821     editor openModalOnClass:cls andSelector:selector.
       
  3822 
       
  3823     editor hasSaved ifTrue:[
       
  3824         holder := self specTool aspectFor:#listSelector.
       
  3825 
       
  3826         holder value ~= editor specSelector ifTrue:[
       
  3827             holder value:editor specSelector.
       
  3828             self accept.
       
  3829         ]
       
  3830     ].
       
  3831 
       
  3832     "Modified: / 12-01-2008 / 10:31:34 / cg"
       
  3833 !
       
  3834 
       
  3835 withSpecClassAndSelectorDo:aTwoArgBlock
       
  3836     "helper for open GUI Painter/open Browser on the current subspecification"
  3785 
  3837 
  3786     |spec cls meta sel|
  3838     |spec cls meta sel|
  3787 
  3839 
  3788     (self resolveName:specClassName) isNil ifTrue:[
  3840     (self resolveName:specClassName) isNil ifTrue:[
  3789         self askForSaving ifFalse: [^self]
  3841         self askForSaving ifFalse: [^self]
  3804     meta := cls class whichClassIncludesSelector:sel.
  3856     meta := cls class whichClassIncludesSelector:sel.
  3805     meta isNil ifTrue:[
  3857     meta isNil ifTrue:[
  3806         ^ self warn:'Cannot find selector #', (sel ? '') asBoldText, ' in class ', cls name asBoldText, '!!'
  3858         ^ self warn:'Cannot find selector #', (sel ? '') asBoldText, ' in class ', cls name asBoldText, '!!'
  3807     ].
  3859     ].
  3808 
  3860 
  3809     self class 
  3861     aTwoArgBlock value:meta value:spec minorKey.
  3810         openOnClass:meta soleInstance 
       
  3811         andSelector:spec minorKey.
       
  3812 
       
  3813     "Modified: / 5.11.2001 / 16:51:46 / cg"
       
  3814 !
       
  3815 
       
  3816 openTabListEditor
       
  3817     "opens a Tab List Editor on current widget"
       
  3818 
       
  3819     |selector editor spec cls holder|
       
  3820 
       
  3821     (cls := self resolveName:specClassName) isNil ifTrue:[
       
  3822         self askForSaving ifTrue:[cls := self resolveName:specClassName].
       
  3823     ].
       
  3824     cls isNil ifTrue:[^ self].
       
  3825 
       
  3826     self acceptOrIgnoreSectionModification.
       
  3827     spec := self specTool specification.
       
  3828 
       
  3829     (selector := spec listSelector) isArray 
       
  3830         ifTrue: [^self warn: 'Cannot open the Tab List Editor on an array!!'].
       
  3831 
       
  3832     editor := TabListEditor new.
       
  3833     editor masterApplication:self.
       
  3834     editor openModalOnClass:cls andSelector:selector.
       
  3835 
       
  3836     editor hasSaved ifTrue:[
       
  3837         holder := self specTool aspectFor:#listSelector.
       
  3838 
       
  3839         holder value ~= editor specSelector ifTrue:[
       
  3840             holder value:editor specSelector.
       
  3841             self accept.
       
  3842         ]
       
  3843     ].
       
  3844 
       
  3845     "Modified: / 12-01-2008 / 10:31:34 / cg"
       
  3846 ! !
  3862 ! !
  3847 
  3863 
  3848 !UIPainter methodsFor:'change & update'!
  3864 !UIPainter methodsFor:'change & update'!
  3849 
  3865 
  3850 layoutChanged
  3866 layoutChanged