• 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
Why would ConvertEventRefToEventRecord fail?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Why would ConvertEventRefToEventRecord fail?


  • Subject: Why would ConvertEventRefToEventRecord fail?
  • From: jason rusoff <email@hidden>
  • Date: Wed, 24 Dec 2003 16:57:44 -0800

I'm working on a 9 to X port and trying to convert a carbon event into
a mac event record. I consistently see the conversion fail. Apple's
docs say nothing about why it might fail. Does anyone have any
experience with this routine and what I might need to set up to get it
to work? Here are some printf's from my running code and the code that
puts them up. The event is simply a click in the windows content
region. Will this fail if the window is a modal dialog?
Thanks,
Jason



pascal OSStatus
GuiWindowsDialog::CarbonEventHandler(EventHandlerCallRef
nextHandler,EventRef theEvent, void* userData)
{

UInt32 eventClass = GetEventClass(theEvent);
UInt32 eventKind = GetEventKind(theEvent);
printf("Event kind %d\n",eventKind);
if ( eventClass == kEventClassWindow)
printf("Event clss is window event\n");

.
.
.
EventRecord theRecord;
ConvertEventRefToEventRecord (theEvent, &theRecord);
printf("After conversion event what = %d\n",theRecord.what);

Event kind 37
Event clss is window event
After conversion event what = 0
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Prev by Date: Re: Table Data and NSArrayController
  • Next by Date: Re: Table Data and NSArrayController
  • Previous by thread: Accepting mouse moved events when not key view
  • Next by thread: Distinguishing clicks on NSSegmentedControl segments
  • Index(es):
    • Date
    • Thread