• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: bindings for nsmatrix
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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
  • Follow-Ups:
    • Re: bindings for nsmatrix
      • From: Emory Smith <email@hidden>
References: 
 >bindings for nsmatrix (From: Emory Smith <email@hidden>)

  • Prev by Date: Re: Creating a JavaVM with JNI & Re:JavaBridge
  • Next by Date: Re: Creating a JavaVM with JNI & Re:JavaBridge
  • Previous by thread: bindings for nsmatrix
  • Next by thread: Re: bindings for nsmatrix
  • Index(es):
    • Date
    • Thread