Path: utzoo!attcan!uunet!lll-winken!csd4.milw.wisc.edu!leah!rpi!batcomputer!gdykes From: gdykes@batcomputer.tn.cornell.edu (Gene Dykes) Newsgroups: comp.windows.x Subject: XtDatabase() problem solved: Intrinsics bug. Message-ID: <7748@batcomputer.tn.cornell.edu> Date: 14 Apr 89 20:10:37 GMT Distribution: comp Organization: Theory Center, Cornell U., Ithaca NY Lines: 23 Yesterday, I posted a request for information about XtDatabase() not working on Sun 3's. As it turns out, the Sun 3 issue is bogus, but there does seem to be a bug (or lack of a significant feature) in the Intrinsics that caused the confusion. Apparently, on both the Sun 3's that were used for testing, there were no .Xdefaults files in the home directory. Without a resource file, The intrinsics didn't create an internal database, hence XtDatabase() returned NULL. The reason this is a bug is because it is reasonable for a widget to want to merge some stuff into the in-memory database. But, if XtDatabase() won't return a handle on it, then there is no proper way to do it. I patched my widget up by copying the opaque _XrmHashBucketRec structure from Xrm.c, and assiging a pointer to it to dpy->db. Luckily, that worked. It seems to me that dpy->db should be filled in with an empty database rather than just leaving it as a NULL pointer. Comments? -- Gene Dykes, gdykes@tcgould.tn.cornell.edu