• 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
Using bindings with an NSArray of NSStrings ?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Using bindings with an NSArray of NSStrings ?


  • Subject: Using bindings with an NSArray of NSStrings ?
  • From: Bjoern Kriews <email@hidden>
  • Date: Tue, 16 Mar 2004 21:10:08 +0100

I have an NSArrayController whose Object Class is set to "NSString".
Its content is set to an NSArray in awakeFromNib.
A NSTableView has one column that is bound to ArrayController.arrangedObjects
with no model key path given in IB.

This (I admit to a little surprise) works fine.

When I try to bind a NSTextFields value to ArrayController.selection
to display the selection I get a crash:

2004-03-16 20:47:21.527 TableDrag[3673] *** -[_NSControllerObjectProxy copyWithZone:]: selector not recognized

I suppose this comes from the cell trying to copy the (supposedly) NSString but the NSControllerObjectProxy
not expecting this.

I have come across a few occasions where parts of my model are so simple that I'd like to use just
NSArrays of NSStrings. As far as I know now, I have to resort to making them into dictionaries
with one key each.

Is there an elegant way to solve this (getting away without the dictionaries ?)

(Right now I am teching Cocoa to a group of interested coworkers and I'd like to keep my examples
as simple as possible)

Thanks, Bjoern
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.


  • Follow-Ups:
    • Re: Using bindings with an NSArray of NSStrings ?
      • From: Allan Odgaard <email@hidden>
    • Re: Using bindings with an NSArray of NSStrings ?
      • From: Scott Anguish <email@hidden>
  • Prev by Date: Re: Capturing Message as Invocation Object
  • Next by Date: Re: Faceless app showing window?
  • Previous by thread: setWindowFrameAutosaveName problems solved!
  • Next by thread: Re: Using bindings with an NSArray of NSStrings ?
  • Index(es):
    • Date
    • Thread