uejio@lll-crg.llnl.gov (Jeremy Y. Uejio) (02/06/90)
I'm having trouble understanding the use and access of class data for
widgets. Basically, I would like to have a function that is common to
a bunch of different widgets that are of different types. For
example, I have widgets which are subclasses of command widgets and
widgets which are subclasses of AsciiText. I would like to define
some sort of generic procedure for both types of widgets so that I can
use the same call for both. I.e.:
mycommonroutine(object,data);
where object is either the command widget or the text widget and data
is just some pointer.
I'm thinking of using the class data to hold this routine, but then I
don't know how to access it or even declare it. Maybe something like:
typedef struct _MyTextClassPart {
void (*mycommonroutine)();
} MyTextClassPart;
Can anyone help me with this?
Thanks in advance,
jeremy uejio@lll-crg.llnl.gov
Jeremy Uejio (pronounced 'oo-ay-joe') uejio@lll-crg.llnl.gov
uucp: {gatech,pyramid,rutgers}!lll-crg!uejio
other things to try: uejio%lll-crg.llnl.gov@relay.cs.net