Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: DataBrowser HitTest-Crash with Custom Item



Christian,

You're getting there.

Change your hit test handler to return true.

Now install a tracking handler and always return the content hit result.

You should then get item selected messages in your notification callback.

I am a little bemused that TBrowser wants to call a tracking proc after you returned false in your hit proc.

Douglas

On 14 Sep 2005, at 07:59, Christian Häusler wrote:

I installed a HitTestCallback in my Databrowser and told him to always return
false. The log doesn't show a warning but the app still crashs.


The log says:

Exception:  EXC_BAD_ACCESS (0x0001)
Codes:      KERN_PROTECTION_FAILURE (0x0002) at 0x00000100

Thread 0 Crashed:
0 <<00000000>> 0x00000100 0 + 0x100 //in the debugger this shows as '??'
1 com.apple.HIToolbox 0x929ae01c TBrowser::TrackItem (unsigned long, unsigned long, Rect&, Point, long, unsigned short) const + 0x50




my callback:

Boolean DataBrowserHitTestCallback (ControlRef browser,DataBrowserItemID itemID,
DataBrowserPropertyID property, const Rect *theRect,
const Rect *mouseRect) {


    return false;
}




_______________________________________________ Do not post admin requests to the list. They will be ignored. Carbon-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/carbon-dev/email@hidden

This email sent to email@hidden
References: 
 >Re: DataBrowser HitTest-Crash with Custom Item (From: Laurence Harris <email@hidden>)
 >Re: DataBrowser HitTest-Crash with Custom Item (From: Christian Häusler <email@hidden>)



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

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.