UIPainter.st
changeset 2222 23205ddb56e1
parent 2220 ff2b5cb004c2
child 2223 7cddff46d0ad
equal deleted inserted replaced
2221:8ac60d4545ad 2222:23205ddb56e1
  3902     ].
  3902     ].
  3903     self replaceWidgetByClass:widgetClass
  3903     self replaceWidgetByClass:widgetClass
  3904 !
  3904 !
  3905 
  3905 
  3906 doBrowseActionMethod:aspectSelector
  3906 doBrowseActionMethod:aspectSelector
       
  3907     self doBrowseActionMethod:aspectSelector nameAs:aspectSelector
       
  3908 !
       
  3909 
       
  3910 doBrowseActionMethod:aspectSelector nameAs:aspectNameShown
  3907     |cls spec aspect code|
  3911     |cls spec aspect code|
  3908 
  3912 
  3909     cls := self specClass.
  3913     cls := self specClass.
  3910     cls isNil ifTrue:[
  3914     cls isNil ifTrue:[
  3911         Dialog information:'No Application Class defined.'.
  3915         Dialog information:'No Application Class defined.'.
  3915     spec := painter specForSelection.
  3919     spec := painter specForSelection.
  3916     spec isNil ifTrue:[^ self].
  3920     spec isNil ifTrue:[^ self].
  3917     aspect := spec perform:aspectSelector.
  3921     aspect := spec perform:aspectSelector.
  3918     aspect isNil ifTrue:[
  3922     aspect isNil ifTrue:[
  3919         Dialog information:(resources 
  3923         Dialog information:(resources 
  3920                                 string:'Please enter a Method name for %1 first.'
  3924                                 string:'Please enter a Method name for "%1" first.'
  3921                                 with:aspectSelector allBold).
  3925                                 with:(resources string:aspectNameShown) allBold).
  3922         ^ self
  3926         ^ self
  3923     ].
  3927     ].
  3924         
  3928         
  3925     (cls implements:aspect asSymbol) ifFalse:[
  3929     (cls implements:aspect asSymbol) ifFalse:[
  3926         (Dialog confirm:(resources 
  3930         (Dialog confirm:(resources 
  4719     fullSpec name:specNameSymbol.
  4723     fullSpec name:specNameSymbol.
  4720 
  4724 
  4721     fullSpec fromBuilder:(self canvas)
  4725     fullSpec fromBuilder:(self canvas)
  4722               components:(SpecCollection new collection:aSpecArray).
  4726               components:(SpecCollection new collection:aSpecArray).
  4723 
  4727 
       
  4728     "/ kludge: if grid was on, its now present in the windowSpec (which should not)
       
  4729     self canvas gridShown ifTrue:[
       
  4730         fullSpec window backgroundColor:nil.    
       
  4731     ].
       
  4732 
  4724     windowSpec notNil ifTrue:[
  4733     windowSpec notNil ifTrue:[
  4725         winSpec := fullSpec window.
  4734         winSpec := fullSpec window.
  4726         winSpec copyValuesFromSpec:windowSpec.
  4735         winSpec copyValuesFromSpec:windowSpec.
  4727         winSpec name: winSpec label.
  4736         winSpec name: winSpec label.
  4728     ].    
  4737     ].