• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: kEventParamMenuRef (was: _NSGetCarbonMenu)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: kEventParamMenuRef (was: _NSGetCarbonMenu)
      • From: Luc Vandal <email@hidden>
References: 
 >_NSGetCarbonMenu useage (From: Luc Vandal <email@hidden>)
 >Re: _NSGetCarbonMenu useage (From: Shawn Erickson <email@hidden>)
 >Re: _NSGetCarbonMenu useage (From: Luc Vandal <email@hidden>)
 >Re: _NSGetCarbonMenu useage (From: Ricky Sharp <email@hidden>)
 >Re: _NSGetCarbonMenu useage (From: Luc Vandal <email@hidden>)
 >Re: _NSGetCarbonMenu useage (From: Eric Schlegel <email@hidden>)
 >Re: kEventParamMenuRef (was: _NSGetCarbonMenu) (From: Luc Vandal <email@hidden>)

  • Prev by Date: Re: Vertically Centering a String within a View
  • Next by Date: Re: NSTextView - text wrapping
  • Previous by thread: Re: kEventParamMenuRef (was: _NSGetCarbonMenu)
  • Next by thread: Re: kEventParamMenuRef (was: _NSGetCarbonMenu)
  • Index(es):
    • Date
    • Thread