FontMenu.st
changeset 2184 16d3b72ca431
parent 1818 fe99c5c721e9
child 2186 05b16a66bb3d
--- a/FontMenu.st	Thu Sep 12 15:32:18 2002 +0200
+++ b/FontMenu.st	Thu Sep 12 15:39:15 2002 +0200
@@ -15,7 +15,7 @@
 "{ Package: 'stx:libtool2' }"
 
 MenuPanel subclass:#FontMenu
-	instanceVariableNames:'model enabledChannel fontFamily fontFace fontStyle fontSize'
+	instanceVariableNames:'enabledChannel fontFamily fontFace fontStyle fontSize'
 	classVariableNames:''
 	poolDictionaries:''
 	category:'Interface-UIPainter'
@@ -298,36 +298,19 @@
 
 !FontMenu methodsFor:'accessing-channels'!
 
-model
-    "get my model
-    "
-  ^ model
-!
-
 model:aValueHolder
     "set my model
     "
+    super model:aValueHolder.
     model notNil ifTrue:[
-        model removeDependent:self. 
-    ].
-    model := aValueHolder.
-
-    model notNil ifTrue:[
-        model addDependent:self.
-        self fontDescription:(model value)
+        self updateFomModel
     ].
 ! !
 
 !FontMenu methodsFor:'change & update'!
 
-update:something with:aParameter from:changedObject
-    "one of my models changed its value
-    "
-    changedObject == model ifTrue:[
-         ^ self fontDescription:(model value)
-    ].
-    super update:something with:aParameter from:changedObject
-
+updateFomModel
+    self fontDescription:(model value)
 ! !
 
 !FontMenu methodsFor:'initialization'!
@@ -365,5 +348,5 @@
 !FontMenu class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libwidg2/FontMenu.st,v 1.10 2000-08-21 22:44:03 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libwidg2/FontMenu.st,v 1.11 2002-09-12 13:39:15 cg Exp $'
 ! !