gdykes@batcomputer.tn.cornell.edu (Gene Dykes) (04/14/89)
I have a major piece of software to contribute to comp.sources.x, but first I need to know the status of a bug I've found. My software runs fine on HP's and RT's, but on a Sun 3, running OS 3.5, and a fully patched up (9 levels?) X11R3, XtDatabase(Display) returns NULL. The argument passed to it seems reasonable, and the source for XtDatabase() is only one executable line, so it appears that the "db" element of the Display structure is just not getting set. Does anybody know anything about this problem? -- Gene Dykes, gdykes@tcgould.tn.cornell.edu
gdykes@batcomputer.tn.cornell.edu (Gene Dykes) (04/15/89)
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