Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Re: What event handler for a HISearchField
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: What event handler for a HISearchField




On Jun 17, 2007, at 4:37 AM, John Cebasek wrote:

result = HISearchFieldCreate(NULL, kHISearchFieldAttributesCancel | kHISearchFieldAttributesSearchIcon, NULL, (CFStringRef)inItem- >configData, outView);

InstallControlEventHandler(*outView, m_searchFieldEventHandler, GetEventTypeCount(searchButtonEvents), searchButtonEvents, this, NULL);

where m_searchFieldEventHandler is an EventHandlerUPP.

When I enter some text into the search field and press return, the program crashes with an EXC_BAD_ACCESS. Here's the stack trace.

#0	0x00000008 in ??
#1	0x93297934 in DispatchEventToHandlers

The code looks OK, but it sure looks like the Carbon Event Manager is trying to call a NULL EventHandler. Are you sure that m_searchFieldEventHandler is non-NULL at the time when you install it?


-eric

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Carbon-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Re: What event handler for a HISearchField (From: John Cebasek <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.