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: Any idea about DataBrowser?



Mike,

I could get which user clicked, content or scroll bar. But when user clicked disclosure triangle,
the same problem occurred. So as you suggested me before, I used ForEachDataBrowserItem to detect
whether the clicked point was in kDataBrowserDisclosurePart.

The way was (in my DataBrowserItemProcPtr)
1. obtain its disclosure bounds with GetDataBrowserItemPartBounds and kDataBrowserPropertyDisclosurePart
2. check if the clicked point in the region.

However, at the line below and the very first call, the error (errDataBrowserItemNoFound) returned.

err = ::GetDataBrowserItemPartBounds (temp_data->browser, item, temp_data->column,
kDataBrowserPropertyEnclosingPart, &wholeRect);
(The function doesn't have ControlRef parameter, I set my structure to pass the procptr.)


So I gave up the way and tried to go to the next way:
1. Obtain number of rows with GetDataBrowserItemCount(db,0,true,-1,&numOfRows)
2. Obtain which column has disclosure triangle with GetDataBrowserTableViewItemID
3. use 'for' loop
4. obtain DataBrowserItemID in the row with GetDataBrowserTableViewItemID
5. obtain its disclosure bounds with GetDataBrowserItemPartBounds and kDataBrowserPropertyDisclosurePart
6. check if the clicked point in the region.

This seemed to be fine, but somehow the same error ended up to occur.
Can't GetDataBrowserItemPartBounds return the bounds when the item is not seen? But if so, I still don't
understand why case 1 didn't make it.

The errDataBrowserItemNoFound is acceptable with GetDataBrowserItemPartBounds?

Would you give me your help, please? What do you think I missed?


Thank you,
Norio Ota
_______________________________________________
carbon-development mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/carbon-development
Do not post admin requests to the list. They will be ignored.

References: 
 >Re: Any idea about DataBrowser? (From: Mike Kluev <email@hidden>)
 >Re: Any idea about DataBrowser? (From: Norio Ota <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.