home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / windows / intervie / 3634 < prev    next >
Encoding:
Text File  |  1993-01-27  |  1.8 KB  |  37 lines

  1. Newsgroups: comp.windows.interviews
  2. Path: sparky!uunet!news.univie.ac.at!scsing.switch.ch!univ-lyon1.fr!ghost.dsi.unimi.it!rpi!uwm.edu!spool.mu.edu!agate!stanford.edu!WATSON.IBM.COM!vlis
  3. From: vlis@WATSON.IBM.COM (John Vlissides)
  4. Subject: Re: Ibuild example - question.
  5. Message-ID: <9301271400.AA21614@aurora.watson.ibm.com>
  6. Sender: news@shelby.stanford.edu (USENET News System)
  7. Reply-To: vlis@watson.ibm.com
  8. Organization: Internet-USENET Gateway at Stanford University
  9. Date: Wed, 27 Jan 1993 14:00:00 GMT
  10. Lines: 25
  11.  
  12. In article <1993Jan27.084420.23833@wyrdrune.demon.co.uk>, you write:
  13.  
  14. > I've been working through the tutorial in the ibuild users guide,
  15. > building the Namer example and have run into an irritating problem,
  16. > I've related the pushButton instance to the StringEditor instance and
  17. > filled in the rest of the Namer::entered() method, but when I run the
  18. > program and test it I find that I go through this method TWICE instead
  19. > of once, regardless of whether I've pressed return in the string field
  20. > or clicked on the entered button.
  21.  
  22. The method you specify in the ButtonState information dialog will be
  23. called whenever the ButtonState's value is modified (see p. 14 in the
  24. user's guide).  What you're seeing is the effect of modifying the
  25. ButtonState twice.
  26.  
  27. Pressing the pushbutton modifies the ButtonState the first time (to 1,
  28. the pushbutton's setting value), which results in the first call to
  29. entered().  But note that the code for the entered() method (p. 22)
  30. sets the ButtonState's value back to 0 (to unhighlight the
  31. pushbutton).  This second modification causes the second call to
  32. entered().  The second call won't cause a second output of the string
  33. because the entered() code checks for a nonzero ButtonState value.
  34.  
  35. --
  36. John Vlissides / IBM T.J. Watson Research / vlis@watson.ibm.com
  37.