fetch models value when a model is assigned;
authorClaus Gittinger <cg@exept.de>
Fri, 28 Feb 1997 19:54:37 +0100
changeset 1083 13e64cc1c493
parent 1082 ccc3aa4268c1
child 1084 f890ae939e49
fetch models value when a model is assigned; not when realized.
PopUpList.st
Toggle.st
--- a/PopUpList.st	Fri Feb 28 19:52:49 1997 +0100
+++ b/PopUpList.st	Fri Feb 28 19:54:37 1997 +0100
@@ -605,6 +605,14 @@
     listMsg := aSelector
 
     "Modified: 26.2.1997 / 19:05:18 / cg"
+!
+
+model:aModel
+    super model:aModel.
+    self getListFromModel.
+    self getSelectionFromModel.
+
+    "Created: 28.2.1997 / 19:12:08 / cg"
 ! !
 
 !PopUpList methodsFor:'change & update'!
@@ -808,18 +816,6 @@
     ].
 
     "Modified: 28.2.1997 / 13:40:46 / cg"
-!
-
-realize
-    super realize.
-    (model notNil or:[listHolder notNil]) ifTrue:[
-        self getListFromModel.
-    ].
-    model notNil ifTrue:[
-        self getSelectionFromModel.
-    ]
-
-    "Modified: 26.2.1997 / 18:23:58 / cg"
 ! !
 
 !PopUpList methodsFor:'private-controller access'!
@@ -914,5 +910,5 @@
 !PopUpList class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libwidg/PopUpList.st,v 1.45 1997-02-28 14:29:48 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libwidg/PopUpList.st,v 1.46 1997-02-28 18:54:22 cg Exp $'
 ! !
--- a/Toggle.st	Fri Feb 28 19:52:49 1997 +0100
+++ b/Toggle.st	Fri Feb 28 19:54:37 1997 +0100
@@ -414,10 +414,9 @@
 
 model:aModel
     super model:aModel.
-    realized ifTrue:[
-        self getValueFromModel.
-    ]
+    self getValueFromModel.
 
+    "Modified: 28.2.1997 / 19:09:58 / cg"
 ! !
 
 !Toggle methodsFor:'change & update'!
@@ -466,14 +465,6 @@
     lampHeight := (device verticalPixelPerMillimeter * 3.5) rounded.
 
     "Modified: 22.1.1997 / 11:57:55 / cg"
-!
-
-realize
-    "/
-    "/ get my initial state from the model (if there is one)
-    "/
-    self getValueFromModel.
-    super realize
 ! !
 
 !Toggle methodsFor:'private'!
@@ -571,5 +562,5 @@
 !Toggle class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libwidg/Toggle.st,v 1.36 1997-02-25 13:23:40 ca Exp $'
+    ^ '$Header: /cvs/stx/stx/libwidg/Toggle.st,v 1.37 1997-02-28 18:54:37 cg Exp $'
 ! !