Thread View: comp.windows.interviews
1 messages
1 total messages
Started by John Vlissides
Wed, 27 Jan 1993 14:00
Re: Ibuild example - question.
Author: John Vlissides
Date: Wed, 27 Jan 1993 14:00
Date: Wed, 27 Jan 1993 14:00
25 lines
1849 bytes
1849 bytes
In article <1993Jan27.084420.23833@wyrdrune.demon.co.uk>, you write: > I've been working through the tutorial in the ibuild users guide, > building the Namer example and have run into an irritating problem, > I've related the pushButton instance to the StringEditor instance and > filled in the rest of the Namer::entered() method, but when I run the > program and test it I find that I go through this method TWICE instead > of once, regardless of whether I've pressed return in the string field > or clicked on the entered button. The method you specify in the ButtonState information dialog will be called whenever the ButtonState's value is modified (see p. 14 in the user's guide). What you're seeing is the effect of modifying the ButtonState twice. Pressing the pushbutton modifies the ButtonState the first time (to 1, the pushbutton's setting value), which results in the first call to entered(). But note that the code for the entered() method (p. 22) sets the ButtonState's value back to 0 (to unhighlight the pushbutton). This second modification causes the second call to entered(). The second call won't cause a second output of the string because the entered() code checks for a nonzero ButtonState value. -- John Vlissides / IBM T.J. Watson Research / vlis@watson.ibm.com
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads