home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / windows / openloo / 5154 < prev    next >
Encoding:
Internet Message Format  |  1993-01-25  |  2.3 KB

  1. Path: sparky!uunet!seismo!darwin.sura.net!paladin.american.edu!howland.reston.ans.net!usc!cs.utexas.edu!sun-barr!west.West.Sun.COM!news2me.EBay.Sun.COM!exodus.Eng.Sun.COM!exodus!rickg
  2. From: rickg@eng.sun.com (The Tankster)
  3. Newsgroups: comp.windows.open-look
  4. Subject: Re: Weird XView 3.0 XV_KEY_DATA problem
  5. Message-ID: <RICKG.93Jan25125945@irondude.eng.sun.com>
  6. Date: 25 Jan 93 17:59:45 GMT
  7. References: <1993Jan22.132748.50171@ccvax.ucd.ie>
  8. Reply-To: rickg@eng.sun.com
  9. Organization: SunSoft, Inc.
  10. Lines: 46
  11. NNTP-Posting-Host: irondude
  12. In-reply-to: ctoomey@ccvax.ucd.ie's message of 22 Jan 93 13:27:48 GMT
  13.  
  14.  
  15.    From: ctoomey@ccvax.ucd.ie
  16.    Newsgroups: comp.windows.open-look
  17.    Date: 22 Jan 93 13:27:48 GMT
  18.    Organization: University College Dublin
  19.  
  20.    Hi All,
  21.        came across a weird problem with XView 3.0 today. I created a canvas as
  22.    a child of a frame and attached 11 items to it's paint window using
  23.    XV_KEY_DATA. This worked fine with XView 2.0 but crashed under version 3.0.
  24.    The cause seemed was an xv_get(window,XV_KEY_DATA,5) instruction which should
  25.    have returned NULL because that item had not yet been set. I tried setting the 
  26.    item in advance - now the thing crashed just after the start of the xv main
  27.    loop. After many hours poring over manuals and wracking my brains for possible 
  28.    causes I tried changing the 5 to a 23. It worked!
  29.  
  30.        What I'd like to know is why? Is it a mistake in my code (there are 
  31.    definitely no other items with this number) or is there an instruction in XView
  32.    3.0 like "if key==5 then crash" :-) If anyone has any ideas I'd like to know...
  33.  
  34.  
  35. can somebody FAQize this?
  36.  
  37. anyway, the deal is that the XView library itself uses
  38. XV_KEY_DATA extensively, so you must be certain that the
  39. key you use is unique.  the methodology for doing this is
  40. to obtain the key from the function xv_unique_key(void).
  41.  
  42. if you just pick arbitrary numbers, especially low numbers,
  43. your likelyhood of collision is quite high, as is your likelyhood
  44. of trampling something that the library depends on.
  45.  
  46. <<tank
  47.  
  48. --
  49.  
  50. *********************************************************************
  51.  
  52.     Richard M. "Tank" Goldstein        rickg@Eng.Sun.COM
  53.     Window Developer Environment
  54.     SunSoft, Inc.
  55.  
  56.     "I'm a scientist.  I don't think, I observe."
  57.             -Dr. Clayton Forrester
  58.  
  59. *********************************************************************
  60.