Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!thunder.mcrcim.mcgill.edu!snorkelwacker.mit.edu!mintaka!think.com!samsung!infinet!thebaut From: thebaut@infinet.UUCP (Suzanne Thebaut) Newsgroups: comp.windows.open-look Subject: Re: problem attaching XV_KEY_DATA to panel Message-ID: <2778@infinet.UUCP> Date: 28 Jun 91 13:17:15 GMT References: <1991Jun27.221718.18172@leland.Stanford.EDU> Reply-To: thebaut@infinet.UUCP (Suzanne Thebaut) Organization: Memotec, Inc. North Andover, MA Lines: 47 In article helvie@EBay.Sun.COM (Fred Helvie) writes: > > >when applying XV_KEY_DATA, the key specified should be a unique >number. A number >= 100 should be safe. >The reason for this is that the toolkit utilizes some of the lower keys >internally. So try: > > >#define MY_KEY 100 Alternatively, devguide uses a call to xv_unique_key() to generate unique numbers of type Attr_attribute for use as keys w/ XV_KEY_DATA: ------------------------------------------------------------------ Attr_attribute MY_KEY; ... Panel panel; char *string = "Hello"; main() { xv_init( ... ); MY_KEY = xv_unique_key(); ... panel = xv_create( ... ); xv_set( panel, XV_KEY_DATA, MY_KEY, string, NULL ); ... } ------------------------------------------------------------------- -Suzanne ################################################################### Suzanne Thebaut infinet!thebaut@samsung.com Memotec, Inc. N. Andover, MA (508) 681-0600 x4430