Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!mit-eddie!bloom-beacon!eru!hagbard!sunic!mcsun!ukc!harrier.ukc.ac.uk!rlh2 From: rlh2@ukc.ac.uk (Richard Hesketh) Newsgroups: comp.windows.x Subject: Re: Why does *BitmapFilePath override XCalendar*BitmapFilePath?? Message-ID: <5599@harrier.ukc.ac.uk> Date: 4 Oct 90 09:57:08 GMT References: <69133@lll-winken.LLNL.GOV> Reply-To: rlh2@ukc.ac.uk (Richard Hesketh) Organization: Computing Lab, University of Kent at Canterbury, UK. Lines: 46 In article <69133@lll-winken.LLNL.GOV> casey@gauss.llnl.gov (Casey Leedom) writes: > > I have a definition for *BitmapFilepath in my personal resources which I >load into the server with xrdb. > I had a >definition for XCalendar*BitmapFilePath defined in the xcalendar application > [...], but >it wasn't used. "BitmapFilePath" is used by XmuLocateBitmapFile() in Xmu/LocBitmap.c The resource database associated with the display pointer passed in to it is searched using a call to XrmQGetResource(). Now from my understanding the X Resource Manager's XrmQGetResource() and XrmGetResource() take a "fully qualified" resource name and class definition and returns the database entry that has the tightest binding to these fully qualified names using Xrm's precedence rules. The fully qualified names passed by XmuLocateBitmapFile() are "bitmapFilePath" and "BitmapFilePath". Therefore only the following entries will ever be found: *BitmapFilePath: blah .BitmapFilePath: foo BitmapFilePath: bar *bitmapFilePath: blah2 .bitmapFilePath: foo2 bitmapFilePath: bar2 XmuLocateBitmapFile() ought to use the "Per Display" information that contains the application class and instance name for the resource query, e.g.: "XCalendar.BitmapFilePath" or "xcalendar.bitmapFilePath" which would atleast make searching for bitmaps application specific. > Curiously a definition of the form XCalendar*Font *did* override my personal >definition of *Font. Thats because the font is a resource of a widget (or application) and is looked up using a fully resource name/class and the toolkit's algorithm for resource database searches. >Casey Richard Hesketh : @nsfnet-relay.ac.uk:rlh2@ukc.ac.uk : rlh2@ukc.ac.uk ..!{mcsun|mcvax}!ukc!rlh2 Computing Officer, Computing Lab., University of Kent at Canterbury, Canterbury, Kent, CT2 7NF, United Kingdom. Tel: +44 227 764000 ext 7620/7590 Fax: +44 227 762811