UIPainter.st
changeset 1523 a8fe5e15220b
parent 1521 2efd2b9419c4
child 1528 4136505d3cbe
equal deleted inserted replaced
1522:f67b97bc683a 1523:a8fe5e15220b
  2144     "opens a GUI Painter on the current subspecification"
  2144     "opens a GUI Painter on the current subspecification"
  2145 
  2145 
  2146     |spec cls meta sel|
  2146     |spec cls meta sel|
  2147 
  2147 
  2148     (self resolveName:specClass) isNil ifTrue:[
  2148     (self resolveName:specClass) isNil ifTrue:[
  2149 	self askForSaving ifFalse: [^self]
  2149         self askForSaving ifFalse: [^self]
  2150     ]. 
  2150     ]. 
  2151 
  2151 
  2152     spec := self specTool specification.
  2152     spec := self specTool specification.
  2153     cls := spec majorKey.
  2153     cls := spec majorKey.
  2154     cls isNil ifTrue:[
  2154     cls isNil ifTrue:[
  2155 	cls := specClass.
  2155         cls := specClass.
  2156     ].
  2156     ].
  2157     (cls := self resolveName:cls inClass:(Smalltalk at: specClass asSymbol)) isNil ifTrue:[
  2157     (cls := self resolveName:cls inClass:(Smalltalk at: specClass asSymbol)) isNil ifTrue:[
  2158 	spec majorKey isNil ifTrue:[
  2158         spec majorKey isNil ifTrue:[
  2159 	    ^ self warn:'Cannot find class (no majorKey specified)'.
  2159             ^ self warn:'Cannot find class (no majorKey specified).'.
  2160 	].
  2160         ].
  2161 	^ self warn:'Cannot find class ', spec majorKey asBoldText, '!!'.
  2161         ^ self warn:('Cannot find class ', spec majorKey asBoldText, '.').
  2162     ].
  2162     ].
  2163     sel := spec minorKey.
  2163     sel := spec minorKey.
  2164     meta := cls class whichClassIncludesSelector:sel.
  2164     meta := cls class whichClassIncludesSelector:sel.
  2165     meta isNil ifTrue:[
  2165     meta isNil ifTrue:[
  2166 	^ self warn:'Cannot find selector #', (sel ? '') asBoldText, ' in class ', cls name asBoldText, '!!'
  2166         ^ self warn:'Cannot find selector #', (sel ? '') asBoldText, ' in class ', cls name asBoldText, '!!'
  2167     ].
  2167     ].
  2168 
  2168 
  2169     self class openOnClass:meta soleInstance andSelector:spec minorKey.
  2169     self class 
  2170 
  2170         openOnClass:meta soleInstance 
       
  2171         andSelector:spec minorKey.
       
  2172 
       
  2173     "Modified: / 5.11.2001 / 16:51:46 / cg"
  2171 !
  2174 !
  2172 
  2175 
  2173 openTabListEditor
  2176 openTabListEditor
  2174     "opens a Tab List Editor on current widget"
  2177     "opens a Tab List Editor on current widget"
  2175 
  2178