--- a/UIPainter.st Fri Jan 11 20:45:48 2008 +0100
+++ b/UIPainter.st Fri Jan 11 20:45:51 2008 +0100
@@ -3913,10 +3913,14 @@
!
doBrowseActionMethod:aspectSelector
+ "browse or create the action method as entered in the field"
+
self doBrowseActionMethod:aspectSelector nameAs:aspectSelector
!
doBrowseActionMethod:aspectSelector nameAs:aspectNameShown
+ "browse or create the action method as entered in the field"
+
|cls spec aspect code|
cls := self specClass.
@@ -3959,10 +3963,14 @@
!
doBrowseAspectMethod:aspectSelector
+ "browse or create the aspect method as entered in the field"
+
self doBrowseAspectMethod:aspectSelector nameAs:aspectSelector
!
doBrowseAspectMethod:aspectSelector nameAs:aspectNameShown
+ "browse or create the aspect method as entered in the field"
+
|cls spec aspect code|
cls := self specClass.
@@ -4005,7 +4013,7 @@
!
doBrowseAspectMethods
- "opens a browser on the aspect methods"
+ "opens a browser on all the aspect methods"
|methods|
@@ -4457,6 +4465,54 @@
^ true
!
+doSelectAspectMethod:aspectSelector
+ "open a dialog to select an existing aspect method and enter in the field"
+
+ self doSelectAspectMethod:aspectSelector nameAs:aspectSelector
+!
+
+doSelectAspectMethod:aspectSelector nameAs:aspectNameShown
+"/ |cls spec aspect code|
+"/
+"/ cls := self specClass.
+"/ cls isNil ifTrue:[
+"/ Dialog information:'No Application Class defined.'.
+"/ ^ self
+"/ ].
+"/
+"/ spec := painter specForSelection.
+"/ spec isNil ifTrue:[^ self].
+"/ aspect := spec perform:aspectSelector.
+"/ aspect isNil ifTrue:[
+"/ Dialog information:(resources
+"/ string:'Please enter a Method name for "%1" first.'
+"/ with:(resources string:aspectNameShown) allBold).
+"/ ^ self
+"/ ].
+"/
+"/ (cls implements:aspect asSymbol) ifFalse:[
+"/ (Dialog confirm:(resources
+"/ stringWithCRs:'%1 does not implement %2.\\Create ?'
+"/ with:(cls name allBold)
+"/ with:aspect allBold))
+"/ ifFalse:[
+"/ (Dialog confirm:(resources
+"/ stringWithCRs:'Browse implementors of %1 ?'
+"/ with:aspect allBold))
+"/ ifTrue:[
+"/ UserPreferences current systemBrowserClass browseImplementorsOf:aspect
+"/ ].
+"/ ^ self
+"/ ].
+"/ code := painter
+"/ generateAspectMethodFor:aspect
+"/ spec:nil
+"/ inClass:cls.
+"/ code readStream fileIn.
+"/ ].
+"/ UserPreferences current systemBrowserClass openInClass:cls selector:aspect
+!
+
doStartApplication
"starts the application on the editing window spec"