bill@allegra.tempo.nj.att.com (Bill Schell) (04/10/90)
Hi there. Perhaps someone could help me out with a problem
I'm having creating menus under an ADEW created application?
I have an application which consists of an lset object with a group of
buttons, a tree/treev object and a text/textview object pasted into
it. I want to override the default menu I'm getting in the tree/treev
object (one pane with 'Quit' in it (from the IM?)) with a menu of my
own.
I first tried using the standard menulist procedure described (on p.102) in
the ATK book to put up menus. I couldn't get this to work under ADEW.
I then figured that the lset/arbiter/cel stuff was getting in my way, so
I read up on them and tried using celview_SetMenulist() on the cel that
contained the treev object. This didn't work either.
Can someone tell me what the proper procedure is?
Also, while I'm asking questions: is ADEW "industrial strength" yet? I
haven't seen any large applications written with it. Should I be
using it or just doing it myself in ATK? Is there someone out there
who wants to relate their experiences with ADEW?
Thanks,
Bill Schell
AT&T Bell Labs, Murray Hill, NJ
bill@allegra.att.com (or {attunix,uunet}!allegra!bill)tpn+@ANDREW.CMU.EDU (Tom Neuendorffer) (04/10/90)
Excerpts from mail: 9-Apr-90 need help using creating me.. Bill Schell@allegra.temp (1176) > Hi there. Perhaps someone could help me out with a problem > I'm having creating menus under an ADEW created application? > ... > I couldn't get this to work under ADEW. > I then figured that the lset/arbiter/cel stuff was getting in my way, so > I read up on them and tried using celview_SetMenulist() on the cel that > contained the treev object. This didn't work either. > Can someone tell me what the proper procedure is? The cel stuff isn't "getting in the way", it is just requiring you to use a different (and simpler) interface, since you are not creating your own view anywhere in the view tree. Celview_SetMenulist() is the proper routine. I just created a simple test routine that overrides the Quit menu when an underlieing fadview has the input focus. At the top of my controller code I have the following. /* user code begins here for includes */ #include <bind.ih> #include <menulist.ih> static void hello(v) struct view *v; { fprintf(stdout,"hello\n"); fflush(stdout); } static struct bind_Description ttstBindings[]={ {"ttst-hello",NULL,0,"Quit~0",0,0,hello,"hello"}, NULL }; /* user code ends here for includes */ and in the initialization code, I have the following. /* user code begins here for ttst_go */ { struct classinfo *viewtype = class_Load("view"); struct menulist *ttstMenus; struct celview *cv; ttstMenus = menulist_New(); bind_BindList(ttstBindings, NULL , ttstMenus, viewtype); if((cv = celview_GetCelviewFromView(self->fadView)) != NULL){ celview_SetMenulist(cv, ttstMenus); celveiw_Repost(cv); } } /* user code ends here for ttst_go */ If there is any chance that the fadview already has the input focus at the time, the call to celview_Repost(cv) will cause the celview's children to repost their menus, so that the celview can add the new entry. Please get in touch if you have any questions. > Also, while I'm asking questions: is ADEW "industrial strength" yet? I > haven't seen any large applications written with it. Should I be > using it or just doing it myself in ATK? Is there someone out there > who wants to relate their experiences with ADEW? As the creator of ADEW and the current manager of the ATK group, I am willing to state that ADEW is as supported and as "industrial strength" as the rest of ATK, though it is a higher level interface than ATK, and, as such, may not be appropriate for some applications. I would also be interested in hearing about other people's experiences with ADEW. Regards, Tom Neuendorffer tpn+@andrew.cmu.edu