3911 ]. |
3911 ]. |
3912 self replaceWidgetByClass:widgetClass |
3912 self replaceWidgetByClass:widgetClass |
3913 ! |
3913 ! |
3914 |
3914 |
3915 doBrowseActionMethod:aspectSelector |
3915 doBrowseActionMethod:aspectSelector |
|
3916 "browse or create the action method as entered in the field" |
|
3917 |
3916 self doBrowseActionMethod:aspectSelector nameAs:aspectSelector |
3918 self doBrowseActionMethod:aspectSelector nameAs:aspectSelector |
3917 ! |
3919 ! |
3918 |
3920 |
3919 doBrowseActionMethod:aspectSelector nameAs:aspectNameShown |
3921 doBrowseActionMethod:aspectSelector nameAs:aspectNameShown |
|
3922 "browse or create the action method as entered in the field" |
|
3923 |
3920 |cls spec aspect code| |
3924 |cls spec aspect code| |
3921 |
3925 |
3922 cls := self specClass. |
3926 cls := self specClass. |
3923 cls isNil ifTrue:[ |
3927 cls isNil ifTrue:[ |
3924 Dialog information:'No Application Class defined.'. |
3928 Dialog information:'No Application Class defined.'. |
3957 ]. |
3961 ]. |
3958 UserPreferences current systemBrowserClass openInClass:cls selector:aspect |
3962 UserPreferences current systemBrowserClass openInClass:cls selector:aspect |
3959 ! |
3963 ! |
3960 |
3964 |
3961 doBrowseAspectMethod:aspectSelector |
3965 doBrowseAspectMethod:aspectSelector |
|
3966 "browse or create the aspect method as entered in the field" |
|
3967 |
3962 self doBrowseAspectMethod:aspectSelector nameAs:aspectSelector |
3968 self doBrowseAspectMethod:aspectSelector nameAs:aspectSelector |
3963 ! |
3969 ! |
3964 |
3970 |
3965 doBrowseAspectMethod:aspectSelector nameAs:aspectNameShown |
3971 doBrowseAspectMethod:aspectSelector nameAs:aspectNameShown |
|
3972 "browse or create the aspect method as entered in the field" |
|
3973 |
3966 |cls spec aspect code| |
3974 |cls spec aspect code| |
3967 |
3975 |
3968 cls := self specClass. |
3976 cls := self specClass. |
3969 cls isNil ifTrue:[ |
3977 cls isNil ifTrue:[ |
3970 Dialog information:'No Application Class defined.'. |
3978 Dialog information:'No Application Class defined.'. |
4003 ]. |
4011 ]. |
4004 UserPreferences current systemBrowserClass openInClass:cls selector:aspect |
4012 UserPreferences current systemBrowserClass openInClass:cls selector:aspect |
4005 ! |
4013 ! |
4006 |
4014 |
4007 doBrowseAspectMethods |
4015 doBrowseAspectMethods |
4008 "opens a browser on the aspect methods" |
4016 "opens a browser on all the aspect methods" |
4009 |
4017 |
4010 |methods| |
4018 |methods| |
4011 |
4019 |
4012 self painter isModified ifTrue:[ |
4020 self painter isModified ifTrue:[ |
4013 self warn:'The current window spec has not yet been saved!!\\The System Browser may show the code of the old aspect methods.' withCRs. |
4021 self warn:'The current window spec has not yet been saved!!\\The System Browser may show the code of the old aspect methods.' withCRs. |
4453 specClassName := classAndSelector methodClass. |
4461 specClassName := classAndSelector methodClass. |
4454 specSelector := classAndSelector methodSelector. |
4462 specSelector := classAndSelector methodSelector. |
4455 specSuperclassName := specClassName superclass name. |
4463 specSuperclassName := specClassName superclass name. |
4456 self doSave. |
4464 self doSave. |
4457 ^ true |
4465 ^ true |
|
4466 ! |
|
4467 |
|
4468 doSelectAspectMethod:aspectSelector |
|
4469 "open a dialog to select an existing aspect method and enter in the field" |
|
4470 |
|
4471 self doSelectAspectMethod:aspectSelector nameAs:aspectSelector |
|
4472 ! |
|
4473 |
|
4474 doSelectAspectMethod:aspectSelector nameAs:aspectNameShown |
|
4475 "/ |cls spec aspect code| |
|
4476 "/ |
|
4477 "/ cls := self specClass. |
|
4478 "/ cls isNil ifTrue:[ |
|
4479 "/ Dialog information:'No Application Class defined.'. |
|
4480 "/ ^ self |
|
4481 "/ ]. |
|
4482 "/ |
|
4483 "/ spec := painter specForSelection. |
|
4484 "/ spec isNil ifTrue:[^ self]. |
|
4485 "/ aspect := spec perform:aspectSelector. |
|
4486 "/ aspect isNil ifTrue:[ |
|
4487 "/ Dialog information:(resources |
|
4488 "/ string:'Please enter a Method name for "%1" first.' |
|
4489 "/ with:(resources string:aspectNameShown) allBold). |
|
4490 "/ ^ self |
|
4491 "/ ]. |
|
4492 "/ |
|
4493 "/ (cls implements:aspect asSymbol) ifFalse:[ |
|
4494 "/ (Dialog confirm:(resources |
|
4495 "/ stringWithCRs:'%1 does not implement %2.\\Create ?' |
|
4496 "/ with:(cls name allBold) |
|
4497 "/ with:aspect allBold)) |
|
4498 "/ ifFalse:[ |
|
4499 "/ (Dialog confirm:(resources |
|
4500 "/ stringWithCRs:'Browse implementors of %1 ?' |
|
4501 "/ with:aspect allBold)) |
|
4502 "/ ifTrue:[ |
|
4503 "/ UserPreferences current systemBrowserClass browseImplementorsOf:aspect |
|
4504 "/ ]. |
|
4505 "/ ^ self |
|
4506 "/ ]. |
|
4507 "/ code := painter |
|
4508 "/ generateAspectMethodFor:aspect |
|
4509 "/ spec:nil |
|
4510 "/ inClass:cls. |
|
4511 "/ code readStream fileIn. |
|
4512 "/ ]. |
|
4513 "/ UserPreferences current systemBrowserClass openInClass:cls selector:aspect |
4458 ! |
4514 ! |
4459 |
4515 |
4460 doStartApplication |
4516 doStartApplication |
4461 "starts the application on the editing window spec" |
4517 "starts the application on the editing window spec" |
4462 |
4518 |