Re: kEventParamMenuRef (was: _NSGetCarbonMenu)
Re: kEventParamMenuRef (was: _NSGetCarbonMenu)
- Subject: Re: kEventParamMenuRef (was: _NSGetCarbonMenu)
- From: Ricky Sharp <email@hidden>
- Date: Wed, 4 May 2005 21:24:16 -0500
On May 4, 2005, at 8:57 PM, Luc Vandal wrote:
One thing though... I'm able to get the item index but I can't seem
to be able to get a MenuRef.
MenuRef ref;
error = GetEventParameter( event, kEventParamMenuRef,
typeMenuRef, NULL, sizeof(MenuRef), NULL, &ref );
I get an -9870 error The piece of data you are requesting from an
event is not present.
I believe the menu ref is actually the direct object in the event, so
you should do something like this:
MenuRef theMenuRef;
OSStatus result = GetEventParameter (theEvent, kEventParamDirectObject,
typeMenuRef, NULL, sizeof (MenuRef), NULL, &theMenuRef);
One of the best places that describes the various carbon events (e.g.
parameters along with their types) is the header itself:
Carbon/CarbonEvents.h
--
Rick Sharp
Instant Interactive(tm)
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden