#DOCUMENTATION
class: UIPainter
added: #doOpenAspectClassChooserFor:
comment/format in:5 methods
--- a/UIPainter.st Fri Mar 25 16:53:26 2016 +0100
+++ b/UIPainter.st Fri Mar 25 19:36:53 2016 +0100
@@ -1,3 +1,5 @@
+"{ Encoding: utf8 }"
+
"
COPYRIGHT (c) 1995-1998 by eXept Software AG
All Rights Reserved
@@ -5420,7 +5422,8 @@
!
doBrowseActionMethod:aspectSelector
- "browse or create the action method as entered in the field (button beside input filed pressed)"
+ "browse or create the action method as entered in the field
+ (button beside input field in ui-slice pressed)"
self acceptOrIgnoreSectionModification.
@@ -5430,7 +5433,8 @@
!
doBrowseActionMethod:aspectSelector nameAs:aspectNameShown
- "browse or create the action method as entered in the field"
+ "browse or create the action method as entered in the field.
+ sent by embedded ui-slice's browse class button."
|cls spec aspect code|
@@ -5478,6 +5482,8 @@
!
doBrowseAspectClass: aspect
+ "sent by embedded ui-slice's 'browse'-class button (for example, subcanvasSpec)."
+
| spec className class |
spec := painter specForSelection.
@@ -5494,6 +5500,8 @@
!
doBrowseAspectClassAndSelector:classAspectAndSelectorAspect
+ "sent by embedded ui-slice's browse class button (for example, subcanvasSpec)."
+
| classAspect selector selectorAspect spec className class |
classAspect := classAspectAndSelectorAspect first. "/ #(#majorKey #minorKey)
@@ -5514,7 +5522,8 @@
!
doBrowseAspectMethod:aspectSelector
- "browse or create the aspect method as entered in the field (button beside input fieled pressed)"
+ "browse or create the aspect method as entered in the field
+ (button beside input field pressed)"
self isModified ifTrue:[ self accept ].
"/ self acceptOrIgnoreSectionModification.
@@ -6072,6 +6081,23 @@
"Modified: / 31-08-2006 / 10:14:10 / cg"
!
+doOpenAspectClassChooserFor: aspect
+ "open a class chooser; when ok, set the aspect to its name
+ sent by embedded ui-slice's '...'-class button (for example, subcanvasSpec)."
+
+ | spec className class choice|
+
+ spec := painter specForSelection.
+ spec isNil ifTrue:[ self error: 'No spec!!'.].
+ className := spec perform: aspect.
+ class := self resolveName: className inClass: specClass.
+ choice := Dialog requestClassName:'Choose class' initialAnswer:(class isNil ifTrue:nil ifFalse:[class name]).
+ choice isEmptyOrNil ifTrue:[^ self ].
+
+ spec perform: (aspect asMutator) with:choice.
+ (specTool aspectFor:aspect) value:choice.
+!
+
doOpenWidgetDocumentation
"opens documentation for the selected widget"