NSMatrix + custom cell + bindings == crash??? EXC_ARITHMETIC
NSMatrix + custom cell + bindings == crash??? EXC_ARITHMETIC
- Subject: NSMatrix + custom cell + bindings == crash??? EXC_ARITHMETIC
- From: Brian Williams <email@hidden>
- Date: Mon, 20 Nov 2006 11:57:04 -0800
Hi cocoa-dev-ers,
I have been trying to make a custom thumbnail view (one that renders
a custom view of my data) using NSMatrix and a custom cell. While I
have been able to get it work if I override bind and expose all the
bindings myself I don't think that I should have to.
I created a little test project, you can find it here:
http://chromaticgray.com/BindingsTest.zip
Basically it has a subclass of NSMatrix (MyMatrix), a subclass of
NSCell (MyCell) and simple content object (CellContents). In IB I
have an arraycontroller (cellContentArrayController) containing
objects of type CellContents and an NSView with the custom class
MyMatrix. MyMatrix is setup to use cells of type MyCell. MyCell uses
the objectValue to hold the CellContents and draws that to the screen.
In the windowControllerDidLoadNib of my window controller I bind the
array controller to the matrix:
[myMatrix bind:@"content" toObject:cellContentArrayController
withKeyPath:@"arrangedObjects" options:nil];
When I run this I get a crash with EXC_ARITHMETIC after bind.
So my question is, should this work? Or am I just totally messed up
in my approach to using a matrix with a custom cell and bindings?
Like said before I got the bindings to work by doing it all myself (i
used mmalc's graphics bindings example, very good examples there BTW
thanks for the resource mmalc) but I really don't think thats the
best approach if the build in bindings will work.
Thanks for any help in advance.
Brian
_______________________________________________
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