home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / windows / x / 19369 < prev    next >
Encoding:
Internet Message Format  |  1992-11-22  |  1.6 KB

  1. Xref: sparky comp.windows.x:19369 comp.windows.x.motif:7601
  2. Newsgroups: comp.windows.x,comp.windows.x.motif
  3. Path: sparky!uunet!utcsri!geac!torsqnt!tmsoft!elegant!drk
  4. From: drk@elegant.com (David King)
  5. Subject: Getting pointer to resource database
  6. Message-ID: <1992Nov19.153930.14273@elegant.com>
  7. Date: Thu, 19 Nov 1992 15:39:30 GMT
  8. Organization: Elegant Communications Inc.
  9. Lines: 31
  10.  
  11. I need to get a pointer to the resource table used in an
  12. application which can be passed to XrmParseCommand().
  13. XtDatabase returns the database whereas XrmParseCommand()
  14. requires a pointer to it.
  15.  
  16. Here's the scenario:
  17.  
  18. I have a Motif application that successfully parses custom
  19. command line options when I pass the option table, argv (et al)
  20. to XtAppInitialize().
  21.  
  22. I have a second application which sends commands to the first
  23. application via a socket. The command buffer received from
  24. the socket looks like the command line. I tokenize the received
  25. buffer and pass it to XrmParseCommand() using the same option
  26. table I pass to XtAppInitialize(). XrmParseCommand() recognizes
  27. the options with no problem.
  28.  
  29. The problem lies in what to pass as the resource database to
  30. XrmParseCommand(). XtDatabase() returns the database whereas
  31. XrmParseCommand() requires a pointer to the database. I can't
  32. figure out how to get the pointer to the resource database
  33. the application uses.
  34.  
  35. If I use XtDisplayInitialize() the new parameters are merged
  36. correctly. This seems an overkill however and has the side
  37. effect of resetting the resources associated with my custom
  38. options to their default values if I don't specify every option
  39. in the command buffer sent via the socket.
  40.  
  41. Anyone got a solution?
  42.