Re: bindings for nsmatrix
Re: bindings for nsmatrix
- Subject: Re: bindings for nsmatrix
- From: Byron Wright <email@hidden>
- Date: Sat, 5 Mar 2005 17:59:00 -0800
I recently did something like this. I think you have to do it
programmatically. Here is some example code from my app.
//bindingOptions = NSMutableDictionary
[bindingOptions setObject:[NSNumber numberWithBool:YES]
forKey:@"NSInsertsNullPlaceholder"];
[bindingOptions setObject:[NSNumber numberWithBool:YES]
forKey:@"NSRaisesForNotApplicableKeys"];
//thumbGrid is an instance of my custom NSMatrixView. You can do this
in awakeFromNib. I have custom NSButtonCells associated with my custom
NSMatrixView. "
[thumbGrid bind:@"content" toObject: self
withKeyPath:@"arrangedObjects" options:bindingOptions];
//bind cells to thumbnailImage
[thumbGrid bind:@"contentValues" toObject: self
withKeyPath:@"arrangedObjects.thumbnailImage" options:bindingOptions];
Hope this helps.
Byron
On Mar 5, 2005, at 5:20 PM, Emory Smith wrote:
hello,
i have a custom control / cell pair for which i have created an IB
palette item. i drag my custom control from the palette to my window
and alt-drag it to get matrix. i have added some custom bindings to
my nscell subclass and these work great, the problem is that i have to
select each cell of the matrix and bind it individually.
i would like to use the "standard" matrix bindings (content,
selectedObjects, etc.) with my matrix of custom cells, but IB does not
show these bindings in the inspector.
what more do i need to do to expose these bindings in IB for a matrix
containing custom cells?
thanks,
emory
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
email@hidden
This email sent to email@hidden
_______________________________________________
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