UIPainter.st
changeset 2357 48ed61c2825e
parent 2353 13774605a1a7
child 2361 ae171f5bc002
equal deleted inserted replaced
2356:bb961692c387 2357:48ed61c2825e
  4320 !
  4320 !
  4321 
  4321 
  4322 doBrowseAspectMethod:aspectSelector nameAs:aspectNameShown
  4322 doBrowseAspectMethod:aspectSelector nameAs:aspectNameShown
  4323     "browse or create the aspect method as entered in the field"
  4323     "browse or create the aspect method as entered in the field"
  4324 
  4324 
  4325     |cls spec aspect code|
  4325     |cls spec aspect code implementingClass|
  4326 
  4326 
  4327     cls := self specClass.
  4327     cls := self specClass.
  4328     cls isNil ifTrue:[
  4328     cls isNil ifTrue:[
  4329         Dialog information:'No Application Class defined.'.
  4329         Dialog information:'No Application Class defined.'.
  4330         ^ self
  4330         ^ self
  4340                                     string:'Please enter a Method name for "%1" first.'
  4340                                     string:'Please enter a Method name for "%1" first.'
  4341                                     with:(resources string:aspectNameShown) allBold).
  4341                                     with:(resources string:aspectNameShown) allBold).
  4342         ].
  4342         ].
  4343         ^ self
  4343         ^ self
  4344     ].
  4344     ].
  4345         
  4345 
  4346     (cls implements:aspect asSymbol) ifFalse:[
  4346     implementingClass := (cls whichClassImplements:aspect asSymbol).
       
  4347     implementingClass isNil ifTrue:[
       
  4348         implementingClass := (cls class whichClassImplements:aspect asSymbol).
       
  4349     ].
       
  4350     implementingClass isNil ifTrue:[
  4347         (Dialog confirm:(resources 
  4351         (Dialog confirm:(resources 
  4348                             stringWithCRs:'%1 does not implement %2.\\Create ?'
  4352                             stringWithCRs:'%1 does not implement %2.\\Create ?'
  4349                             with:(cls name allBold)
  4353                             with:(cls name allBold)
  4350                             with:aspect allBold)) 
  4354                             with:aspect allBold)) 
  4351         ifFalse:[
  4355         ifFalse:[
  4361             generateAspectMethodFor:aspect 
  4365             generateAspectMethodFor:aspect 
  4362             spec:spec 
  4366             spec:spec 
  4363             inClass:cls.
  4367             inClass:cls.
  4364         code readStream fileIn.
  4368         code readStream fileIn.
  4365     ].
  4369     ].
  4366     UserPreferences current systemBrowserClass openInClass:cls selector:aspect
  4370     UserPreferences current systemBrowserClass 
       
  4371         openInClass:implementingClass selector:aspect
  4367 !
  4372 !
  4368 
  4373 
  4369 doBrowseAspectMethods
  4374 doBrowseAspectMethods
  4370     "opens a browser on all the aspect methods"
  4375     "opens a browser on all the aspect methods"
  4371 
  4376