Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!dali.cs.montana.edu!uakari.primate.wisc.edu!sdd.hp.com!wuarchive!uunet!mcsun!ukc!harrier.ukc.ac.uk!elder.ukc.ac.uk!rlh2 From: rlh2@ukc.ac.uk (R.L.Hesketh) Newsgroups: comp.windows.x Subject: Re: Question regarding XtGetResourceList & XtGetConstraintResourceList Message-ID: <472@elder.ukc.ac.uk> Date: 9 May 91 07:28:00 GMT References: Reply-To: rlh2@ukc.ac.uk (Richard Hesketh) Organization: Computing Lab, University of Kent at Canterbury, UK. Lines: 26 In article montanaro@crdgw1.ge.com (Skip Montanaro) writes: > XtGetResourceList(XtClass(instance->id), &resources, &count); >The function always returns the widget-specific data back, as opposed to the >class-specific data. How does XtGetResourceList know what the widget id is, >since it's getting a WidgetClass as input, not a Widget? I'd be extremely surprised if it did! You are getting back the class-specific data .. by this I think you mean the default_type and default_address? These will be correct for the WidgetClass given. The resource value of a particular widget instance may indeed have the same value as that returned by XtGetResourceList but this is because it has been created with the class default value. > XtGetConstraintResourceList(XtClass(instance->id), &resources, &count); > >It always sets resources to NULL, even if the widget specified by >instance->id is a child of an XmForm widget. Am I calling it incorrectly? No you must give it the Class of the constraint parent, i.e. if (XtParent(instance->id) != NULL) XtGetConstraintResourceList(XtClass(XtParent(instance->id)), &resources, &count); Richard