Re: Re-wrapping cells in an NSMatrix with bindings
Re: Re-wrapping cells in an NSMatrix with bindings
- Subject: Re: Re-wrapping cells in an NSMatrix with bindings
- From: "John Buckley" <email@hidden>
- Date: Fri, 28 Apr 2006 14:45:48 +0100
Lawrence,
I have a similar custom NSMatrix, used to implement an "icon view".
There is a 'private' method on NSMatrix called "-
_selectFirstEnabledCell" which gets called at various times by
NSMatrix and does what it says on the tin. This may be interfering
with the behaviour you want - i.e. re-flow columns but maintain the
current selection.
I re-implemented _selectFirstEnabledCell in my subclass as an empty
method - it does nothing. This fixed all my weird selection problems.
John
On 27/04/06, Lawrence Sanbourne <email@hidden> wrote:
Hello,
I'm developing an application with UI similar to iPhoto. I'm using an
NSMatrix subclass to display the photos (in this case, icons). The
matrix is bound to an array controller's arrangedObjects. When the
window is resized (or the view otherwise changes size), the matrix
needs to gain or lose columns, scaling accordingly, and then rewrap
the displayed objects.
I've gotten it to gain and lose columns and scale properly. The
problem is that I'm currently doing the rewrapping by calling
-rearrangeObjects on the array controller, which is causing the
matrix's enclosing scroll view to scroll to the top and the selection
to be restored to the first object.
What would be a better way of doing this that would still play nicely
with bindings?
Larry
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
--
------------------------
Dr. John Buckley
email@hidden
Mac OS X Tiger
------------------------
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden