home *** CD-ROM | disk | FTP | other *** search
- 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
- From: rickg@eng.sun.com (The Tankster)
- Newsgroups: comp.windows.open-look
- Subject: Re: Weird XView 3.0 XV_KEY_DATA problem
- Message-ID: <RICKG.93Jan25125945@irondude.eng.sun.com>
- Date: 25 Jan 93 17:59:45 GMT
- References: <1993Jan22.132748.50171@ccvax.ucd.ie>
- Reply-To: rickg@eng.sun.com
- Organization: SunSoft, Inc.
- Lines: 46
- NNTP-Posting-Host: irondude
- In-reply-to: ctoomey@ccvax.ucd.ie's message of 22 Jan 93 13:27:48 GMT
-
-
- From: ctoomey@ccvax.ucd.ie
- Newsgroups: comp.windows.open-look
- Date: 22 Jan 93 13:27:48 GMT
- Organization: University College Dublin
-
- Hi All,
- came across a weird problem with XView 3.0 today. I created a canvas as
- a child of a frame and attached 11 items to it's paint window using
- XV_KEY_DATA. This worked fine with XView 2.0 but crashed under version 3.0.
- The cause seemed was an xv_get(window,XV_KEY_DATA,5) instruction which should
- have returned NULL because that item had not yet been set. I tried setting the
- item in advance - now the thing crashed just after the start of the xv main
- loop. After many hours poring over manuals and wracking my brains for possible
- causes I tried changing the 5 to a 23. It worked!
-
- What I'd like to know is why? Is it a mistake in my code (there are
- definitely no other items with this number) or is there an instruction in XView
- 3.0 like "if key==5 then crash" :-) If anyone has any ideas I'd like to know...
-
-
- can somebody FAQize this?
-
- anyway, the deal is that the XView library itself uses
- XV_KEY_DATA extensively, so you must be certain that the
- key you use is unique. the methodology for doing this is
- to obtain the key from the function xv_unique_key(void).
-
- if you just pick arbitrary numbers, especially low numbers,
- your likelyhood of collision is quite high, as is your likelyhood
- of trampling something that the library depends on.
-
- <<tank
-
- --
-
- *********************************************************************
-
- Richard M. "Tank" Goldstein rickg@Eng.Sun.COM
- Window Developer Environment
- SunSoft, Inc.
-
- "I'm a scientist. I don't think, I observe."
- -Dr. Clayton Forrester
-
- *********************************************************************
-