Mailing Lists: Apple Mailing Lists

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

Data Browser selection order




I have a list in a data browser control that is set to only allow one thing to be selected at a time. It has a DataBrowserItemNotificationUPP attached to it so I can keep track of the kDataBrowserItemSelected and kDataBrowserItemDeselected events.

My plan was to have it so that if an item is selected from the list, some other controls would be activated and their data populated by whatever was selected. Similarly when there is no selection, the controls would be disabled.


The problem is that the events are happening in the opposite order of what I expected. When the first item is selected in the list, I get the kDataBrowserItemSelected correctly. When a second item in the list is selected, I get another kDataBrowserItemSelected (which causes the process to enable the other controls and populate them) followed by a kDataBrowserItemDeselected (which causes the other controls to be disabled.) So after the first item is selected, nothing else is getting enabled.


I am obviously doing something incorrectly, but I’m not sure what. I haven’t found any good documentation on using the callbacks, or why it is allowing a brief moment where two things are selected. Is there a way to get the information in the deselect/select order? Should I instead be trying to use
kDataBrowserSelectionSetChanged in some way? Right now I’m thinking of writing a complicated algorithm to try and manually switch things into the opposite order, but I would prefer not to go down that route.

Thanks


Erik Allen
 _______________________________________________
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



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.