Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.milw.wisc.edu!bionet!apple!bloom-beacon!EXPO.LCS.MIT.EDU!kit From: kit@EXPO.LCS.MIT.EDU (Chris D. Peterson) Newsgroups: comp.windows.x Subject: Re: Adding new values to new widget Message-ID: <8907252103.AA06134@expo.lcs.mit.edu> Date: 25 Jul 89 21:03:11 GMT References: <2678@quanta.eng.ohio-state.edu> Sender: daemon@bloom-beacon.MIT.EDU Organization: The Internet Lines: 22 > I am in the process of writing a new widget which will be a subclass > of the Core widget. I would like to be able to set/get values of certain > instance record values in this new widget's part of the instance record using > the XtSetValues/XtGetValues functions. Am I right in guessing that the fields > in the Core's part of the instance record named intialize_hook, set_values_hook > and get_values_hook pertain to what I'm trying to do? If so (or if not ;-), > could someone please explain how to do this? If you are storing these resources in the instance part of your new widget then you do not need to use the *Hook functions. GetValues() will just return the data stored in the instance structure. SetValues() will pass you a copy of the instance structure before and after the new values have been inserted. Take a look at the Athena Simple Widget and Template widgets for some example source code. Chris D. Peterson MIT X Consortium Net: kit@expo.lcs.mit.edu Phone: (617) 253 - 9608 Address: MIT - Room NE43-213