• 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: NSArrayController nib binding vs code binding
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSArrayController nib binding vs code binding


  • Subject: Re: NSArrayController nib binding vs code binding
  • From: Trygve Inda <email@hidden>
  • Date: Mon, 18 Jul 2011 18:41:01 -0700
  • Thread-topic: NSArrayController nib binding vs code binding

> I have a class (MyClass) that conforms to the collection methods for mutable
> collections such as...
>
> -(void)insert<Key>:(NSArray *)locationArray atIndexes:(NSIndexSet *)indexes
>
>
> In my nib I have an NSArrayController and an instance of MyClass
>
> My binding for the NSArrayController content looks like:
>
> Bind to: MyClassObject
> Model Key Path: places
>
> MyClass maintains an NSMutableArray and feeds objects as required with
> methods like
>
> -(void)insertPlaces:(NSArray *)locationArray atIndexes:(NSIndexSet *)indexes
>
> It all works fine.
>
> Then I tried removing the MyClass from the nib and creating it in code. So I
> create a MyClass object and then call
>
> [myArrayController bind:@"content" toObject:myClassObject
> withKeyPath:@"places" options:NULL];

Hmm... Seems like it should be bind:@"contentArray"

The other possibly related issue is that I have my table delegate defined in
the nib and seem to get

-(void)tableViewSelectionDidChange:(NSNotification *)aNotification

Before awakeFromNib which means my binding has not taken place yet. Do I
need to set the delegate in awakeFrmNib rather than in the nib directly?

Thank you,

T.



_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: NSArrayController nib binding vs code binding
      • From: Mike Abdullah <email@hidden>
    • Re: NSArrayController nib binding vs code binding
      • From: Quincey Morris <email@hidden>
References: 
 >NSArrayController nib binding vs code binding (From: Trygve Inda <email@hidden>)

  • Prev by Date: NSArrayController nib binding vs code binding
  • Next by Date: Re: Unable to re-add tracking area after it's been removed
  • Previous by thread: NSArrayController nib binding vs code binding
  • Next by thread: Re: NSArrayController nib binding vs code binding
  • Index(es):
    • Date
    • Thread