home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / windows / x / intrinsi / 730 < prev    next >
Encoding:
Internet Message Format  |  1993-01-08  |  2.1 KB

  1. Xref: sparky comp.windows.x.intrinsics:730 comp.windows.x.motif:8424
  2. Path: sparky!uunet!vtserf!creatures!csgrad.cs.vt.edu!ramakris
  3. From: ramakris@csgrad.cs.vt.edu (S.Ramakrishnan)
  4. Newsgroups: comp.windows.x.intrinsics,comp.windows.x.motif
  5. Subject: Re: Attach data to widget *other* than via XmNuserData?
  6. Message-ID: <3998@creatures.cs.vt.edu>
  7. Date: 8 Jan 93 05:35:48 GMT
  8. References: <BUZZ.93Jan6164723@lion.bear.com> <1993Jan7.180147.13806@cfmu.eurocontrol.be>
  9. Sender: usenet@creatures.cs.vt.edu
  10. Followup-To: comp.windows.x.intrinsics
  11. Organization: VPI&SU Computer Science Department, Blacksburg, VA
  12. Lines: 41
  13.  
  14. In article <1993Jan7.180147.13806@cfmu.eurocontrol.be> phil@cfmu.eurocontrol.be (Phil Day) writes:
  15.   >If you don't mind going down a level to Xlib, then have a look
  16.   >at the Context Manager routines:
  17.   >
  18.   >    XDeleteContext
  19.   >    XFindContext
  20.   >    XSaveContext
  21.   >    XUniqueContext
  22.   >
  23.   >which allow you to associated untyped data with a window (on the client side)
  24.  
  25. On the client side ? You mean not in the server ?
  26.  
  27.    [...storing/retrieving userdata using Xlib functions...]
  28.   
  29.  
  30. Comments:
  31.  
  32.   1. Since the X*Context() functions require the (Display *) _and_
  33.      (Window) arguments, I think the user's data is stored with the
  34.      server just as properties are. If that's the case, every
  35.      fetch/retrieve wil be a roundtrip request to server.
  36.      If the server is on a congested network, the program will suffer.
  37.  
  38.      Unless the user data is meant to be shared with other processes
  39.      sharing the display/window, why should the data be stored with the
  40.      server ? Why the overheadd ?
  41.      
  42.   >(NB: Your widgets must be realized before using these routines !)
  43.  
  44.   2. A widget may be realized; it may still not have a window (slow
  45.      network, moody window manager, etc). You must then install 
  46.      an XmNexposeCallback or XmNmapCallback as appropriate
  47.      to make sure.
  48.  
  49.  If the user data is private to the program, why not keep it within
  50.  the program ? You can simply store the address of any complicate 
  51.  structure as XmNuserData.
  52.  
  53. ---
  54. S Ramakrishnan, CS Dept, McBryde Hall, VaTech
  55.