Path: utzoo!mnetor!steve From: steve@mnetor.UUCP (Steve Rees) Newsgroups: comp.windows.x.motif Subject: Re: trouble with structures and callbacks Message-ID: <5609@mnetor.UUCP> Date: 23 Nov 90 15:35:46 GMT References: <2450@kiwi.mpr.ca> Reply-To: steve@mnetor.UUCP (Steve Rees) Organization: Motorola Technical Systems Division, Toronto Design Centre Lines: 22 In article <2450@kiwi.mpr.ca> baker@mprgate.mpr.ca (Sue Baker) writes: > struct widget_type{ /* more detail to be added */ > Widget widget_array[4]; }; /* to structure later */ > > struct widget_type text; > > XtAddCallback(update, XmNactivateCallback, get_text, text); > Let me be the first (maybe not.. 8-) ) of dozens to suggest: XtAddCallback(update, XmNactivateCallback, get_text, &text); then, void get_text( Widget w, struct widget_type *w_type, caddr_t call ) { w_type->widget_array[i], etc. } -- Steve Rees {uunet|utzoo}!mnetor!steve or (better) steve%mnetor.uucp@uunet.uu.net Ma Bell: +1 416 475 8980 ext. 322 ISO-standard witty quote: "Quoth the raven, 'Eat my shorts!'" - Bart Simpson