--- a/SimpleView.st Tue Jul 17 09:27:32 2018 +0200
+++ b/SimpleView.st Thu Jul 19 16:15:02 2018 +0200
@@ -1,3 +1,5 @@
+"{ Encoding: utf8 }"
+
"
COPYRIGHT (c) 1989 by Claus Gittinger
All Rights Reserved
@@ -4814,27 +4816,28 @@
addSubView:newView before:aViewOrNil
"add a view to the collection of subviews before another view.
- If the argument aViewOrNil is nil, the newView is added at the end.
+ If the argument aViewOrNil is nil, the newView is added at the beginning.
This makes sense, in Panels and other layout views, to enter a new
element at some defined place."
subViews isNil ifTrue:[
- subViews := OrderedCollection with:newView
+ subViews := OrderedCollection with:newView
] ifFalse:[
- (subViews includesIdentical:newView) ifTrue:[
- self error:'trying to add a view twice' mayProceed:true.
- ^ self.
- ].
- aViewOrNil isNil ifTrue:[
- subViews addFirst:newView
- ] ifFalse:[
- subViews add:newView before:aViewOrNil.
- ]
+ (subViews includesIdentical:newView) ifTrue:[
+ self error:'trying to add a view twice' mayProceed:true.
+ ^ self.
+ ].
+ aViewOrNil isNil ifTrue:[
+ subViews addFirst:newView
+ ] ifFalse:[
+ subViews add:newView before:aViewOrNil.
+ ]
].
self setContainerIn:newView.
"Modified: / 09-05-1996 / 00:47:23 / cg"
"Modified (comment): / 22-03-2012 / 10:39:18 / cg"
+ "Modified (comment): / 19-07-2018 / 15:32:39 / Claus Gittinger"
!
addSubView:aView in:bounds borderWidth:bw