if keepClientView is set, care for a view being already
created by the application (as done in stnapster, where
the app already creates an applicationSubView...)
--- a/SubCanvas.st Wed Feb 07 14:02:16 2001 +0100
+++ b/SubCanvas.st Thu Feb 08 17:38:00 2001 +0100
@@ -357,11 +357,30 @@
].
clientView isNil ifTrue:[
- useApplicationSubView ifTrue:[
- clientView := ApplicationSubView new.
- clientView application:client.
- ] ifFalse:[
- clientView := View new.
+ "/ if there is already a view in the builder
+ "/ (pre-created by application)
+ "/ use that one. Consider this a kludge.
+ keepClientView ifTrue:[
+ builder notNil ifTrue:[
+ builder window notNil ifTrue:[
+ builder window container isNil ifTrue:[
+ builder window application == client ifTrue:[
+ clientView := builder window
+ ]
+ ]
+ ]
+ ].
+ ].
+
+ "/ otherwise, create a new view
+
+ clientView isNil ifTrue:[
+ useApplicationSubView ifTrue:[
+ clientView := ApplicationSubView new.
+ clientView application:client.
+ ] ifFalse:[
+ clientView := View new.
+ ]
]
].
@@ -545,5 +564,5 @@
!SubCanvas class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libwidg2/SubCanvas.st,v 1.39 2001-01-08 11:12:57 penk Exp $'
+ ^ '$Header: /cvs/stx/stx/libwidg2/SubCanvas.st,v 1.40 2001-02-08 16:38:00 cg Exp $'
! !