• 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: NSPopUpCell/NSTableView/Bindings via code
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSPopUpCell/NSTableView/Bindings via code


  • Subject: Re: NSPopUpCell/NSTableView/Bindings via code
  • From: Steven Kramer <email@hidden>
  • Date: Tue, 19 Oct 2004 15:57:16 +0200


Op 19-okt-04 om 5:01 heeft Todd Freese het volgende geschreven:

I am trying to convert an NSTableview created in IB to one created via code. I am also using bindings.

Everything is working except a cell with an NSPopUpCell in it. So I am looking for an example of creating a column of NSPopUpCells that are bound.


Bind the column's datacell (after changing it into an NSPopUp{Button}Cell)

[cell bind: @"content" toObject: NSApp withKeyPath: keyPath options: nil];
[cell bind: @"contentValues" toObject: NSApp withKeyPath: [keyPath stringByAppendingString: @".sortName"] options: nil];

then bind the column

[tableColumn bind: @"value" toObject: controller withKeyPath: @"arrangedObjects.person.sortName" options: nil];


Good luck!

Steven Kramer

--
email@hidden
http://sprintteam.com/

_______________________________________________
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
References: 
 >NSPopUpCell/NSTableView/Bindings via code (From: Todd Freese <email@hidden>)

  • Prev by Date: RE: Re: Programatically connect a NSNumberFormatter[Solved]
  • Next by Date: Re: Obtaining the size of a directory
  • Previous by thread: NSPopUpCell/NSTableView/Bindings via code
  • Next by thread: using plist fileTypes for NSOpenPanel
  • Index(es):
    • Date
    • Thread