david@jpl-devvax.JPL.NASA.GOV (David E. Smyth) (08/19/89)
kit@EXPO.LCS.MIT.EDU (Chris D. Peterson) writes: > >> ... I need to access the child. I tried the naive >> >> Childwidget = vpwidget->viewport.child; >> >> It bombed of course. Am I missing something here ? > >The ONLY accepted method of accessing widget data is through the resource >list. Going directly into the widget structure is ugly, and you get what >you deserve when the next release comes out and things have been restructured >internally. What about when you want to call the funcs normally called by translations and acclerators, like unset(), highlight(), etc. in a Command widget? Seems to me that the only way to get at these is by accessing the actions member of the (in this case Command) class, and knowing that this member is initially an XtActionsList before class initialization (which occurs at th first instantiation of a (in this case Command) widget). Is there any other way to invoke XtActionProcs? Seems rather silly to make invoking them easy for users via translations and acclerators described in resource files, and somewhat painful for application programmers. Well, not really painful, but obscure and probably the code will break with later releases of Xt. >the *P.h are private header files and should only be used by the widget itself >and its subclasses. If you as an application writer have to include it >the you are doing something wrong. Of course, the only way to get at the actions member is by including a *P.h file by the application...
gabe@hpcvlx.HP.COM (Gabe Begeddov) (08/23/89)
/ hpcvlx:comp.windows.x / david@jpl-devvax.JPL.NASA.GOV (David E. Smyth) / 2:41 pm Aug 18, 1989 / Is there any other way to invoke XtActionProcs? The R4 intrinsics will most likely contain an application interface for calling action procs explicitly such as XtCallActionProc.