User-agent: Internet Messaging Program (IMP) H3 (4.1.3) / FreeBSD-6.1
Quoting Erik Allen <email@hidden>:
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.
...
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 have run into similar problems with my DB controls.
The solution I used was to check the number of items selected in my
deselect callback. (Use a GetDataBrowserItems() call and a
GetHandleSize(items) / sizeof(DataBrowserItemID) to get the count.) I
then only disable the controls if the itemcount is zero.
If it isn't zero, I know I'm in the transient state and so I ignore
the notification.
Bill
_______________________________________________
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