home *** CD-ROM | disk | FTP | other *** search
- Xref: sparky comp.windows.x:19369 comp.windows.x.motif:7601
- Newsgroups: comp.windows.x,comp.windows.x.motif
- Path: sparky!uunet!utcsri!geac!torsqnt!tmsoft!elegant!drk
- From: drk@elegant.com (David King)
- Subject: Getting pointer to resource database
- Message-ID: <1992Nov19.153930.14273@elegant.com>
- Date: Thu, 19 Nov 1992 15:39:30 GMT
- Organization: Elegant Communications Inc.
- Lines: 31
-
- I need to get a pointer to the resource table used in an
- application which can be passed to XrmParseCommand().
- XtDatabase returns the database whereas XrmParseCommand()
- requires a pointer to it.
-
- Here's the scenario:
-
- I have a Motif application that successfully parses custom
- command line options when I pass the option table, argv (et al)
- to XtAppInitialize().
-
- I have a second application which sends commands to the first
- application via a socket. The command buffer received from
- the socket looks like the command line. I tokenize the received
- buffer and pass it to XrmParseCommand() using the same option
- table I pass to XtAppInitialize(). XrmParseCommand() recognizes
- the options with no problem.
-
- The problem lies in what to pass as the resource database to
- XrmParseCommand(). XtDatabase() returns the database whereas
- XrmParseCommand() requires a pointer to the database. I can't
- figure out how to get the pointer to the resource database
- the application uses.
-
- If I use XtDisplayInitialize() the new parameters are merged
- correctly. This seems an overkill however and has the side
- effect of resetting the resources associated with my custom
- options to their default values if I don't specify every option
- in the command buffer sent via the socket.
-
- Anyone got a solution?
-