Access device and drawableId via message sends
authorStefan Vogel <sv@exept.de>
Mon, 18 Aug 2014 20:28:19 +0200
changeset 5127 fcd696f9f401
parent 5126 ad71b20ca516
child 5128 787b617a99e5
child 5130 2821ba480073
Access device and drawableId via message sends
RadioButton.st
ScrollBar.st
--- a/RadioButton.st	Sun Aug 03 14:31:57 2014 +0200
+++ b/RadioButton.st	Mon Aug 18 20:28:19 2014 +0200
@@ -844,19 +844,25 @@
 !RadioButton methodsFor:'changing state'!
 
 turnOff
+    |id|
+
     super turnOff.
-    drawableId notNil ifTrue:[
+    id := gc drawableId.
+    id notNil ifTrue:[
         self isNativeWidget ifTrue:[
-            self graphicsDevice changeButtonState:false in:drawableId.
+            self graphicsDevice changeButtonState:false in:id.
         ].
     ].
 !
 
 turnOn
+    |id|
+
     super turnOn.
-    drawableId notNil ifTrue:[
+    id := gc drawableId.
+    id notNil ifTrue:[
         self isNativeWidget ifTrue:[
-            self graphicsDevice changeButtonState:true in:drawableId.
+            self graphicsDevice changeButtonState:true in:id.
         ].
     ].
 ! !
@@ -1142,10 +1148,10 @@
 !RadioButton class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libwidg/RadioButton.st,v 1.55 2014-08-03 12:31:33 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libwidg/RadioButton.st,v 1.56 2014-08-18 18:28:19 stefan Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libwidg/RadioButton.st,v 1.55 2014-08-03 12:31:33 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libwidg/RadioButton.st,v 1.56 2014-08-18 18:28:19 stefan Exp $'
 ! !
 
--- a/ScrollBar.st	Sun Aug 03 14:31:57 2014 +0200
+++ b/ScrollBar.st	Mon Aug 18 20:28:19 2014 +0200
@@ -750,9 +750,9 @@
 createElements
     "private: create my elements"
 
-    (device supportsNativeWidgetType:#Scrollbar) ifTrue:[
+    (self graphicsDevice supportsNativeWidgetType:#Scrollbar) ifTrue:[
         "/ native widget contains all I need.
-        "/ but I need a thumb fro the model
+        "/ but I need a thumb from the model
         thumb := Scroller new.
         thumb beInvisible.
         ^ self
@@ -1194,10 +1194,10 @@
 !ScrollBar class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libwidg/ScrollBar.st,v 1.93 2014-08-03 12:31:57 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libwidg/ScrollBar.st,v 1.94 2014-08-18 18:28:19 stefan Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libwidg/ScrollBar.st,v 1.93 2014-08-03 12:31:57 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libwidg/ScrollBar.st,v 1.94 2014-08-18 18:28:19 stefan Exp $'
 ! !