Need to send
self changed: #isMySketches
Regards, Gary
----- Original Message -----
From: "Hilaire Fernandes" <[email protected]>
To: <[email protected]>
Sent: Tuesday, August 02, 2011 12:11 PM
Subject: [Pharo-project] updating the state of a state button
In a dialog, I found the state of a button is not updated, even after
self changed. See the code bellowm with methodes defnied in the dialog:
newMySketchesButton
^ self
newButtonFor: self
getState: #isMySketches
action: #sketches
arguments: nil
getEnabled: #beMySketches "alway return true"
label: 'MySketches' translated
help: 'View my sketches' translated
sketches
self isExamples: false.
isExamples: boolean
isExamples := boolean.
self changed
isMySketches
^self isExamples not
There is no #update at the dialog level, how should the button state
updated? (I know I can do it by-hand) Implementing myself an #update or
do I miss something?
Thanks
Hilaire
--
Education 0.2 -- http://blog.ofset.org/hilaire