Mailing Lists: Apple Mailing Lists

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

NSMatrix and Predicate Searching



I've currently got an NSMatrix of images bound to an NSArray controller.
I recently implemented the predicate bindings so that I could have live
search capabilities. Everything works great - except that when the
search criteria preclude all except for one item (not the selected one),
the non-selected items gets selected. The drawRect method, for some
reason, calls -selectCellAtRow:column: passing it the 0,0 coordinates
even though that cell shouldn't be selected at all. This seems to be
called some time during the _selectFirstEnabledCell private method. The
really strange part is, if I override _selectFirstEnabledCell as an
empty function, it stops the behavior (but also breaks the
re-highlighting of the selected cell when it comes back into the
view)...if I try to selective re-highlight cells based on the content,
it starts re-highlighting the first cell when it's reduced to one
(non-selected) cell. I only need to check the NSArrayController for its
selection indexes to change this behavior - in other words, I don't
actually perform any operations on selecting or deselecting cells, if I
simply send a message to the NSMatrix's controller object, it changes
the behavior of the selection. Strange stuff...does anyone have any
insight into this? Or any recommendations on where to look?

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-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.