home *** CD-ROM | disk | FTP | other *** search
- Xref: sparky comp.windows.x.intrinsics:730 comp.windows.x.motif:8424
- Path: sparky!uunet!vtserf!creatures!csgrad.cs.vt.edu!ramakris
- From: ramakris@csgrad.cs.vt.edu (S.Ramakrishnan)
- Newsgroups: comp.windows.x.intrinsics,comp.windows.x.motif
- Subject: Re: Attach data to widget *other* than via XmNuserData?
- Message-ID: <3998@creatures.cs.vt.edu>
- Date: 8 Jan 93 05:35:48 GMT
- References: <BUZZ.93Jan6164723@lion.bear.com> <1993Jan7.180147.13806@cfmu.eurocontrol.be>
- Sender: usenet@creatures.cs.vt.edu
- Followup-To: comp.windows.x.intrinsics
- Organization: VPI&SU Computer Science Department, Blacksburg, VA
- Lines: 41
-
- In article <1993Jan7.180147.13806@cfmu.eurocontrol.be> phil@cfmu.eurocontrol.be (Phil Day) writes:
- >If you don't mind going down a level to Xlib, then have a look
- >at the Context Manager routines:
- >
- > XDeleteContext
- > XFindContext
- > XSaveContext
- > XUniqueContext
- >
- >which allow you to associated untyped data with a window (on the client side)
-
- On the client side ? You mean not in the server ?
-
- [...storing/retrieving userdata using Xlib functions...]
-
-
- Comments:
-
- 1. Since the X*Context() functions require the (Display *) _and_
- (Window) arguments, I think the user's data is stored with the
- server just as properties are. If that's the case, every
- fetch/retrieve wil be a roundtrip request to server.
- If the server is on a congested network, the program will suffer.
-
- Unless the user data is meant to be shared with other processes
- sharing the display/window, why should the data be stored with the
- server ? Why the overheadd ?
-
- >(NB: Your widgets must be realized before using these routines !)
-
- 2. A widget may be realized; it may still not have a window (slow
- network, moody window manager, etc). You must then install
- an XmNexposeCallback or XmNmapCallback as appropriate
- to make sure.
-
- If the user data is private to the program, why not keep it within
- the program ? You can simply store the address of any complicate
- structure as XmNuserData.
-
- ---
- S Ramakrishnan, CS Dept, McBryde Hall, VaTech
-