[comp.soft-sys.andrew] how to get class info from a celview?

bill@allegra.tempo.nj.att.com (Bill Schell) (10/16/90)

Hi.  I'm having a bit of a problem accessing class information from new
menu items added to a celview.  Perhaps someone else knows the solution
to the problem I'm seeing?

I've defined an object using ADEW (arb, createcon, etc).   It's an lset with
a stringV in the top part and and a text-panel combination in the bottom.
I've set the menulist for one of the subviews (the StringV) via:

testlistMenus = menulist_New();
bind_BindList(testlistBindings, NULL, testlistMenus, viewtype);

if ( (cv = celview_GetCelviewFromView(self->titleView)) != NULL) {
        celview_SetMenulist(cv, testlistMenus);
        celview_Repost(cv);
}

All OK so far.  The new menus show up when I hit the middle button. 
(Curiously,
if I pick the panel view, they don't show up).  Now comes the problem.
When the routines connected to the menu items get called, they are called
with a celview pointer.   However, what I want to access from those
menu routines is the class data for the class I've defined with ADEW.
(called testlist in my case).  Can I get there from here?

Thanks very much,

Bill Schell
bill@allegra.att.com
AT&T Bell Labs, Murray Hill, NJ

[An Andrew ToolKit view (an animated drawing) was included here, but
could not be displayed.]

tpn+@andrew.cmu.edu (Tom Neuendorffer) (10/17/90)

Excerpts from mail: 16-Oct-90 how to get class info from .. Bill
Schell@allegra.temp (1140+1)

> When the routines connected to the menu items get called, they are called
> with a celview pointer.   However, what I want to access from those
> menu routines is the class data for the class I've defined with ADEW.
> (called testlist in my case).  Can I get there from here?


The static FindSelf() routine, created by createcon and included in your
testlist object, can be used by your menu routine. When passed a pointer
to any view in the application,  FindSelf() will return a pointer to the
relevant testlist object.

	
Tom Neuendorffer 	(tpn@andrew.cmu.edu)
Information Technology Center
Carnegie Mellon University
4910 Forbes Ave.
Pittsburgh, Pa. 15213-3890
Phone:	(412) 268-6108
Fax:	(412) 268-6787