home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / windows / openloo / 3744 < prev    next >
Encoding:
Internet Message Format  |  1992-09-08  |  1.9 KB

  1. Path: sparky!uunet!ogicse!news.u.washington.edu!uw-beaver!ssc-vax!mattb
  2. From: mattb@ssc-vax (Matt Baney)
  3. Newsgroups: comp.windows.open-look
  4. Subject: Re: XV-KEY_DATA Numbers
  5. Message-ID: <5538@ssc-bee.ssc-vax.boeing.com>
  6. Date: 1 Sep 92 19:42:09 GMT
  7. Article-I.D.: ssc-bee.5538
  8. References: <5510@ssc-bee.ssc-vax.boeing.com> <12665@ecs.soton.ac.uk>
  9. Sender: news@ssc-vax.boeing.com
  10. Reply-To: mattb@ssc-vax.boeing.com (Matt Baney)
  11. Organization: Boeing Aerospace & Electronics
  12. Lines: 44
  13.  
  14. In article <12665@ecs.soton.ac.uk> djp@ecs.soton.ac.uk writes:
  15. >>>  Some key values are used by the XView toolkit routines for their
  16. >>>own purposes.  (This is the case in XView 2.0, I haven't checked the
  17. >>>3.0 source, since the values below have worked fine there also.)
  18. >>>
  19. >>>  For my key values, I start at 10001 and go up.  This has so far
  20. >>>avoided any collision problems.  It is not as easy as it should be
  21. >>>to figure out what key values are unused.^^^^^^^^^^^^^^^^^^^^^^^^^
  22. >>  ^^^^^^^^^^^^^^^^^^^^^^^
  23. >>
  24. >
  25. >I believe xv_unique_key() does the job.
  26. >
  27. What I don't understand though is do I have to call xv_unique_key
  28. everytime I create an object and want to use an XV_KEY_DATA slot??
  29. If I create 1000 panel_buttons and I want to attach an author-name
  30. to each button can I do this
  31.  
  32.   int AUTHOR_KEY = xv_unique_key();
  33.  
  34.   xv_create(XV_NULL, PANEL_BUTTON, 
  35.         PANEL_ITEM_LABEL, "sdlkjfl",
  36.         XV_X,  ....
  37.         XV_KEY_DATA, AUTHOR_KEY, "M. BANEY",
  38.         NULL);
  39.  
  40.         or
  41.  
  42. Do I have to do this:
  43.  
  44.   xv_create(XV_NULL, PANEL_BUTTON, 
  45.         PANEL_ITEM_LABEL, "sdlkjfl",
  46.         XV_X,  ....
  47.         XV_KEY_DATA, xv_unique_key(), "M. BANEY",
  48.         NULL);
  49.  
  50. thanks~!!
  51.  
  52.  
  53. -- 
  54. |  Matt Baney         |     Boeing Defense and Space Group   |
  55. | "I can't tolerate   | UUCP:     ..!uw-beaver!ssc-vax!mattb |        
  56. | intolerant people!" | Internet:   mattb@ssc-vax.boeing.com |
  57. |---------------------|--------------------------------------|
  58.