Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sun-barr!olivea!samsung!dali.cs.montana.edu!rpi!ispd-newsserver!ism.isc.com!b1!ico!auto-trol!marbru From: marbru@auto-trol.com (Martin Brunecky) Newsgroups: comp.windows.x.motif Subject: Re: Question about using UIL and resources in .Xdefaults file. Message-ID: <1991May21.154048.2536@auto-trol.com> Date: 21 May 91 15:40:48 GMT References: Sender: news@auto-trol.com Organization: Auto-trol Technology Corporation Lines: 32 Nntp-Posting-Host: server_1-gw In article cpetterb@glacier.sim.es.com (Cary Petterborg) writes: > >We are using UIL to create applications. Is there a way to get the >.Xdefaults resources to be used in the application instead of the >UIL hardcoded stuff? We are unable to get the application to use >the resources to override the UIL values. > First if all, don't munge your application resources into .Xdefaults. Not that it won't work, but it's just a bad practice - everybody dumping everything into .XDefaults. Plus, your application is most likely getting .Xdefaults as a server RESOURCES property - probbably the least efficient way to get it. So, keep your .Xdefaults small, and use app-defaults, application class specific resource files. Next. Sure you can use resources with UIL. However, you can NOT override resource values in UIL/UID file with resources in resource file. In resource files, you can only specify what is NOT in UIL, because the resource fetch order / override is as follows: - widget class default - resources from Xrm resource databse ( tight bindings first, loose next) - arguments to widget creation, in UIL case values specified in UIL/UID fil So, whatever you define in your UIL file wins. -- =*= Opinions presented here are solely of my own and not those of Auto-trol =*= Martin Brunecky marbru%auto-trol@sunpeaks.central.sun.com (303) 252-2499 (better avoid: marbru@auto-trol.COM ) Auto-trol Technology Corp. 12500 North Washington St., Denver, CO 80241-2404