equal
deleted
inserted
replaced
203 "Modified: 17.1.1997 / 19:04:47 / cg" |
203 "Modified: 17.1.1997 / 19:04:47 / cg" |
204 ! |
204 ! |
205 |
205 |
206 applicationClass |
206 applicationClass |
207 "return the value of the instance variable 'applicationClass' (automatically generated). |
207 "return the value of the instance variable 'applicationClass' (automatically generated). |
208 This is a private interface for the UIPainter to pass down the app-class |
208 WARNING: |
209 to the specs when editing." |
209 This is a private interface for the UIPainter to pass down the app-class |
|
210 to the specs when editing." |
210 |
211 |
211 ^ applicationClass |
212 ^ applicationClass |
212 ! |
213 ! |
213 |
214 |
214 applicationClass:something |
215 applicationClass:something |
215 "set the value of the instance variable 'applicationClass' (automatically generated). |
216 "set the value of the instance variable 'applicationClass' (automatically generated). |
216 This is a private interface for the UIPainter to pass down the app-class |
217 WARNING: |
217 to the specs when editing." |
218 This is a private interface for the UIPainter to pass down the app-class |
|
219 to the specs when editing." |
218 |
220 |
219 applicationClass := something. |
221 applicationClass := something. |
220 ! |
222 ! |
221 |
223 |
222 aspectAt:aSymbol |
224 aspectAt:aSymbol |
239 b := bindings at:aSymbol ifAbsent:nil. |
241 b := bindings at:aSymbol ifAbsent:nil. |
240 b notNil ifTrue:[^ b]. |
242 b notNil ifTrue:[^ b]. |
241 ]. |
243 ]. |
242 |
244 |
243 application notNil ifTrue:[ |
245 application notNil ifTrue:[ |
244 Object messageNotUnderstoodSignal handle:[:ex | |
246 MessageNotUnderstood |
245 ex parameter selector == aSymbol ifFalse:[ |
247 ignoreNotUnderstoodOf:aSymbol |
246 ex reject |
248 in:[ |
247 ] |
249 ^ application aspectFor:aSymbol |
248 ] do:[ |
250 ]. |
249 ^ application aspectFor:aSymbol |
251 MessageNotUnderstood |
250 ]. |
252 ignoreNotUnderstoodOf:aSymbol |
251 Object messageNotUnderstoodSignal handle:[:ex | |
253 in:[ |
252 ex parameter selector == aSymbol ifFalse:[ |
254 ^ application class aspectFor:aSymbol |
253 ex reject |
255 ]. |
254 ] |
|
255 ] do:[ |
|
256 ^ application class aspectFor:aSymbol |
|
257 ]. |
|
258 |
256 |
259 ^ exceptionBlock value. |
257 ^ exceptionBlock value. |
260 ] |
258 ] |
261 ]. |
259 ]. |
262 ^ nil |
260 ^ nil |
490 "return list of named components |
488 "return list of named components |
491 " |
489 " |
492 ^ namedComponents |
490 ^ namedComponents |
493 ! |
491 ! |
494 |
492 |
|
493 resources |
|
494 application notNil ifTrue:[ |
|
495 ^ application resources |
|
496 ]. |
|
497 ^ Dialog classResources. |
|
498 ! |
|
499 |
495 subCanvasAt:majorKey at:minorKey |
500 subCanvasAt:majorKey at:minorKey |
496 "get the subCanvas or subSpec specification from major and minor key. |
501 "get the subCanvas or subSpec specification from major and minor key. |
497 Here, we first look for a spec in the private subCanvasSpecs dictionary, |
502 Here, we first look for a spec in the private subCanvasSpecs dictionary, |
498 which can be filled via #specificationAt:at:put: messages. |
503 which can be filled via #specificationAt:at:put: messages. |
499 If not present, or none is found there, we bounce back trying |
504 If not present, or none is found there, we bounce back trying |
531 Transcript showCR:('WindowBuilder[warning]: missing application when fetching majorKey:' , majorKey). |
536 Transcript showCR:('WindowBuilder[warning]: missing application when fetching majorKey:' , majorKey). |
532 ]. |
537 ]. |
533 ]. |
538 ]. |
534 |
539 |
535 cls notNil ifTrue:[ |
540 cls notNil ifTrue:[ |
536 Object messageNotUnderstoodSignal handle:[:ex|] do:[ |
541 MessageNotUnderstood catch:[ |
537 ^ cls specificationFor:minorKey |
542 ^ cls specificationFor:minorKey |
538 ]. |
543 ]. |
539 Object messageNotUnderstoodSignal handle:[:ex|] do:[ |
|
540 ^ cls perform:minorKey. |
|
541 ] |
|
542 ]. |
544 ]. |
543 ^ nil |
545 ^ nil |
544 ! |
546 ! |
545 |
547 |
546 subCanvasAt:majorKey at:minorKey put:aSpec |
548 subCanvasAt:majorKey at:minorKey put:aSpec |
733 ex reject |
735 ex reject |
734 ] |
736 ] |
735 ]. |
737 ]. |
736 |
738 |
737 application notNil ifTrue:[ |
739 application notNil ifTrue:[ |
738 application messageNotUnderstoodSignal handle:handlerBlock do:[ |
740 MessageNotUnderstood handle:handlerBlock do:[ |
739 ^ application perform:aSelector |
741 ^ application perform:aSelector |
740 ]. |
742 ]. |
741 cls := application class. |
743 cls := application class. |
742 |
744 |
743 cls messageNotUnderstoodSignal handle:handlerBlock do:[ |
745 MessageNotUnderstood handle:handlerBlock do:[ |
744 ^ cls perform:aSelector |
746 ^ cls perform:aSelector |
745 ] |
747 ] |
746 ]. |
748 ]. |
|
749 " |
|
750 WARNING: |
|
751 This is a private interface for the UIPainter to pass down the app-class |
|
752 " |
747 applicationClass notNil ifTrue:[ |
753 applicationClass notNil ifTrue:[ |
748 applicationClass messageNotUnderstoodSignal handle:handlerBlock do:[ |
754 MessageNotUnderstood handle:handlerBlock do:[ |
749 ^ applicationClass perform:aSelector |
755 ^ applicationClass perform:aSelector |
750 ] |
756 ] |
751 ] |
757 ] |
752 ]. |
758 ]. |
753 ^ aBlock value |
759 ^ aBlock value |
770 ex reject |
776 ex reject |
771 ] |
777 ] |
772 ]. |
778 ]. |
773 |
779 |
774 application notNil ifTrue:[ |
780 application notNil ifTrue:[ |
775 application messageNotUnderstoodSignal handle:handlerBlock do:[ |
781 MessageNotUnderstood handle:handlerBlock do:[ |
776 ^ application perform:aSelector with:anArgument |
782 ^ application perform:aSelector with:anArgument |
777 ]. |
783 ]. |
778 cls := application class. |
784 cls := application class. |
779 |
785 |
780 cls messageNotUnderstoodSignal handle:handlerBlock do:[ |
786 MessageNotUnderstood handle:handlerBlock do:[ |
781 ^ cls perform:aSelector with:anArgument |
787 ^ cls perform:aSelector with:anArgument |
782 ] |
788 ] |
783 ]. |
789 ]. |
|
790 " |
|
791 WARNING: |
|
792 This is a private interface for the UIPainter to pass down the app-class |
|
793 " |
784 applicationClass notNil ifTrue:[ |
794 applicationClass notNil ifTrue:[ |
785 applicationClass messageNotUnderstoodSignal handle:handlerBlock do:[ |
795 MessageNotUnderstood handle:handlerBlock do:[ |
786 ^ applicationClass perform:aSelector with:anArgument |
796 ^ applicationClass perform:aSelector with:anArgument |
787 ]. |
797 ]. |
788 ] |
798 ] |
789 ]. |
799 ]. |
790 ^ aBlock value |
800 ^ aBlock value |
807 ex reject |
817 ex reject |
808 ] |
818 ] |
809 ]. |
819 ]. |
810 |
820 |
811 application notNil ifTrue:[ |
821 application notNil ifTrue:[ |
812 application messageNotUnderstoodSignal handle:handlerBlock do:[ |
822 MessageNotUnderstood handle:handlerBlock do:[ |
813 ^ application perform:aSelector with:arg1 with:arg2 |
823 ^ application perform:aSelector with:arg1 with:arg2 |
814 ]. |
824 ]. |
815 cls := application class. |
825 cls := application class. |
816 |
826 |
817 cls messageNotUnderstoodSignal handle:handlerBlock do:[ |
827 MessageNotUnderstood handle:handlerBlock do:[ |
818 ^ cls perform:aSelector with:arg1 with:arg2 |
828 ^ cls perform:aSelector with:arg1 with:arg2 |
819 ] |
829 ] |
820 ]. |
830 ]. |
|
831 " |
|
832 WARNING: |
|
833 This is a private interface for the UIPainter to pass down the app-class |
|
834 " |
821 applicationClass notNil ifTrue:[ |
835 applicationClass notNil ifTrue:[ |
822 applicationClass messageNotUnderstoodSignal handle:handlerBlock do:[ |
836 MessageNotUnderstood handle:handlerBlock do:[ |
823 ^ applicationClass perform:aSelector with:arg1 with:arg2 |
837 ^ applicationClass perform:aSelector with:arg1 with:arg2 |
824 ]. |
838 ]. |
825 ] |
839 ] |
826 ]. |
840 ]. |
827 ^ aBlock value |
841 ^ aBlock value |
991 (by the builder) to ask for the interfaceSpec for a subCanvas or subSpecification. |
1005 (by the builder) to ask for the interfaceSpec for a subCanvas or subSpecification. |
992 Here, first the local bindings are searched, then the application and |
1006 Here, first the local bindings are searched, then the application and |
993 finally the applications class is asked for a corresponding interfaceSPec. |
1007 finally the applications class is asked for a corresponding interfaceSPec. |
994 The returned object is typically an interfaceSpec array." |
1008 The returned object is typically an interfaceSpec array." |
995 |
1009 |
996 ^ self safelyPerform:#specificationFor: |
1010 ^ self |
997 with:aKey |
1011 safelyPerform:#specificationFor: |
998 ifNone:[ self aspectFor:aKey ] |
1012 with:aKey |
|
1013 ifNone:[ self aspectFor:aKey ] |
999 ! ! |
1014 ! ! |
1000 |
1015 |
1001 !WindowBuilder methodsFor:'spec creation callbacks'! |
1016 !WindowBuilder methodsFor:'spec creation callbacks'! |
1002 |
1017 |
1003 createdComponent:aView forSpec:spec named:name |
1018 createdComponent:aView forSpec:spec named:name |
1287 ! ! |
1302 ! ! |
1288 |
1303 |
1289 !WindowBuilder class methodsFor:'documentation'! |
1304 !WindowBuilder class methodsFor:'documentation'! |
1290 |
1305 |
1291 version |
1306 version |
1292 ^ '$Header: /cvs/stx/stx/libview2/WindowBuilder.st,v 1.97 2002-05-03 17:58:55 cg Exp $' |
1307 ^ '$Header: /cvs/stx/stx/libview2/WindowBuilder.st,v 1.98 2002-07-25 16:40:14 ca Exp $' |
1293 ! ! |
1308 ! ! |