equal
deleted
inserted
replaced
4869 ! |
4869 ! |
4870 |
4870 |
4871 doBrowseAspectMethod:aspectSelector nameAs:aspectNameShown |
4871 doBrowseAspectMethod:aspectSelector nameAs:aspectNameShown |
4872 "browse or create the aspect method as entered in the field" |
4872 "browse or create the aspect method as entered in the field" |
4873 |
4873 |
4874 |cls spec aspect code implementingClass answer| |
4874 |cls spec aspect implementingClass answer| |
4875 |
4875 |
4876 cls := self specClass. |
4876 cls := self specClass. |
4877 cls isNil ifTrue:[ |
4877 cls isNil ifTrue:[ |
4878 Dialog information:'No Application Class defined.'. |
4878 Dialog information:'No Application Class defined.'. |
4879 ^ self |
4879 ^ self |
4880 ]. |
4880 ]. |
4881 |
4881 |
4882 spec := painter specForSelection. |
4882 spec := painter specForSelection. |
4883 spec isNil ifTrue:[^ self]. |
4883 spec isNil ifTrue:[self halt. ^ self]. |
4884 |
4884 |
4885 aspect := spec perform:aspectSelector. |
4885 aspect := spec perform:aspectSelector. |
4886 aspect isString ifFalse:[ |
4886 aspect isString ifFalse:[ |
4887 "ignore non-strings (list may be an Array)" |
4887 "ignore non-strings (list may be an Array)" |
4888 aspect isNil ifTrue:[ |
4888 aspect isNil ifTrue:[ |
4918 ^ self |
4918 ^ self |
4919 ]. |
4919 ]. |
4920 |
4920 |
4921 self doGenerateAspectMethodsForAll:(Array with:aspect). |
4921 self doGenerateAspectMethodsForAll:(Array with:aspect). |
4922 implementingClass := self painter targetClass. |
4922 implementingClass := self painter targetClass. |
4923 "/ code := painter |
|
4924 "/ generateAspectMethodFor:aspect |
|
4925 "/ spec:spec |
|
4926 "/ inClass:cls. |
|
4927 "/ code readStream fileIn. |
|
4928 |
4923 |
4929 answer == #create ifTrue:[^ self]. |
4924 answer == #create ifTrue:[^ self]. |
4930 ] ifFalse:[ |
4925 ] ifFalse:[ |
4931 (Dialog confirm:(resources string:'Browse the implementation of %1?')) ifFalse:[ |
4926 (Dialog confirm:(resources string:'Browse the implementation of %1?')) ifFalse:[ |
4932 ^ self. |
4927 ^ self. |
6432 subview providing the item is returned. If no property is detected nil is |
6427 subview providing the item is returned. If no property is detected nil is |
6433 returned" |
6428 returned" |
6434 |
6429 |
6435 |view item| |
6430 |view item| |
6436 |
6431 |
6437 (view := aView) notNil ifTrue:[ |
6432 (view := aView) isNil ifTrue:[ ^ nil ]. |
6438 [(item := self itemOfView:view) isNil] whileTrue:[ |
6433 |
6439 (view := view superView) isNil ifTrue:[^ listOfNodes at:1] |
6434 [(item := self itemOfView:view) isNil] whileTrue:[ |
6440 ]. |
6435 (view := view superView) isNil ifTrue:[^ listOfNodes at:1] |
6441 ]. |
6436 ]. |
6442 ^ item |
6437 ^ item |
6443 ! ! |
6438 ! ! |
6444 |
6439 |
6445 !UIPainter::TreeView methodsFor:'user interaction'! |
6440 !UIPainter::TreeView methodsFor:'user interaction'! |