• 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: Binding multiple NSTableView and NSPopupButton to an NSArrayControler
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Binding multiple NSTableView and NSPopupButton to an NSArrayControler


  • Subject: Re: Binding multiple NSTableView and NSPopupButton to an NSArrayControler
  • From: Quincey Morris <email@hidden>
  • Date: Mon, 02 May 2011 10:03:44 -0700

On May 2, 2011, at 08:02, Lorenzo Thurman wrote:

> I have an NSPopupButton whose content is bound to an NSArrayController's (controller A) arrangeObjects controller Key. This NSArrayController is bound to an NSMutableArray which holds the items for display. The contents of the NSPopuButton display as expected.
>
> In another XIB (NSWindowController subclass), I have an NSTableView whose only column's value is bound to an NSArrayController's (controller B) arrangedObjects. This NSArrayController resides in the same XIB as the NSTableView and is bound via an NSObject proxy in that same XIB to the same NSMutableArray as controller A. These items display as expected in the NSTableView. I can remove an item from the NSTableView, and in the debugger, I can see that the item is indeed removed from the NSMutableArray. But when I save the array on quitting the application, I see the removed item has somehow made it back into the array.

This is a little bit clearer, but still to vague to be of much use.

The short answer is that it sounds like you have 2 mutable arrays underlying all of this. After you've checked the item removal in the debugger, you should check in the debugger again at save time that it's the *same* array you're saving, rather than a duplicate that hasn't had the item removed.

I have no idea what "bound via an NSObject proxy in that same XIB to the same NSMutableArray as controller A" means. I'm also not sure, when you say "bound", you are always referring to an actual binding, or sometimes to an outlet connection.

To solve this, we need to to know all of the bindings, including (for each one): the object that's bound from; its location (in nib or created programmatically); the binding name; the object that it's bound to; *its* location; the property key that its bound to.


_______________________________________________

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: Re: Binding multiple NSTableView and NSPopupButton to an NSArrayControler
      • From: email@hidden
References: 
 >Re: Binding multiple NSTableView and NSPopupButton to an NSArrayControler (From: Lorenzo Thurman <email@hidden>)

  • Prev by Date: Re: UIGestureRecognizer in superview firing
  • Next by Date: WunderRadio MMS streaming: Want to hear!
  • Previous by thread: Re: Binding multiple NSTableView and NSPopupButton to an NSArrayControler
  • Next by thread: Re: Re: Binding multiple NSTableView and NSPopupButton to an NSArrayControler
  • Index(es):
    • Date
    • Thread