Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!swrinde!elroy.jpl.nasa.gov!decwrl!adobe!asente From: asente@adobe.com (Paul Asente) Newsgroups: comp.windows.x Subject: Re: Design problem in XtVaGetApplicationResources Message-ID: <12721@adobe.UUCP> Date: 18 Mar 91 23:23:30 GMT References: <3108@laura.UUCP> Sender: news@adobe.COM Organization: Adobe Systems Inc. Lines: 27 In article <3108@laura.UUCP> klute@tommy.informatik.uni-dortmund.de (Rainer Klute) writes: >However, this stuff will only work if you already have a connection to an X >server, because you have to pass a widget (hence a display connection) as >parameter to XtVaGetApplicationResources. Now, what can I do if I don't have >one? Before opening any display connection and creating any widgets my >application *first* wants to read its resources - using >XtVaGetApplicationResources - and only then open a display connection *upon the >values of the retrieved resources*. In Xt, you can't fetch database resources before opening a display because there is no database to fetch the resources from until after you open a display. You could add a new routine that fetched resources from the display's database before creating any widgets on the display, but it wouldn't solve your problem. What database would you expect the resources to be fetched from without the context of the display? You're probably thinking the .Xdefaults file, but Xt normally gets the contents of the .Xdefaults file from the display, not from the file itself. -paul asente asente@adobe.com ...decwrl!adobe!asente Ratz put a bucket of liquid in front of me. "I wanted a glass of docs, Ratz. What the hell is this?" I barked. "Motif don't fit in a glass anymore," he barked back. I looked at the liquid. It was totally opaque to me.