Path: utzoo!utgpu!utstat!jarvis.csri.toronto.edu!rutgers!cs.utexas.edu!uunet!mcvax!ukc!harrier.ukc.ac.uk!rlh2 From: rlh2@ukc.ac.uk (Richard Hesketh) Newsgroups: comp.windows.x Subject: Re: Programs relying on app-defaults files (was: Re: xclipboard bug?) Keywords: app-defaults Message-ID: <1333@harrier.ukc.ac.uk> Date: 31 May 89 09:58:00 GMT References: <8905151402.AA06843@THANATOS.MIT.EDU> <773@acorn.co.uk> <1041@sragwa.sra.JUNET> <3401@hplabsz.HPL.HP.COM> <1305@harrier.ukc.ac.uk> <3408@hplabsz.HPL.HP.COM> Reply-To: rlh2@ukc.ac.uk (Richard Hesketh) Organization: Computing Lab, University of Kent at Canterbury, UK. Lines: 33 In article <3408@hplabsz.HPL.HP.COM> dayoung@hplabsz.UUCP (Doug A. Young) writes: >[talking about a "RegisterAppDefaults" function - deleted]. >Unfortunately, (as you pointed out) because >your standalone function requires a display, it doesn't work quite >as intended unless the library redefines some of the Intrinsics intialization >functions. By the time you have opened the display, >Xt has already loaded the user's resource files. Now you are in the >position of overriding the users choices, not specifying defaults, which >is exactly what I was trying to avoid with my version. [ deleted ] Umm, well it *does* really work as required. The function actually creates a new database using the registered defaults *then* merges in the database, created by the Intrinsics when the display is opened. Therefore the application registered resources *are* defaults because they are overridden by any resources set in app-defaults files or via xrdb or the -xrm command line option. There is no real problem here (I was just covering myself 8-) its just that you must have opened a Display before you create any widgets ... which is not possible with XtInitialize() because it creates a shell immediately after it has opened the Display. Whereas XtOpenDisplay() can be used then XmuRegister..() then XtCreate..() to give you the correct functionality. Maybe I didn't make this clear enough. (The code wasn't obvious 8-() >Doug Young Richard Richard Hesketh : rlh2@ukc.ac.uk ..!mcvax!ukc!rlh2 --- Computing Lab., University of Kent at Canterbury, Canterbury, Kent, CT2 7NF, United Kingdom. Tel: (0227) 764000 ext. 3682