• 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
Custom binding not being updated
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Custom binding not being updated


  • Subject: Custom binding not being updated
  • From: "Mike R. Manzano" <email@hidden>
  • Date: Tue, 20 Nov 2007 00:20:11 -0800

Hello,

I have a class that exposes a custom binding, one which I'm trying to bind to an NSArrayController. I know the NSArrayController is hooked up correctly because several NSTableColumns are bound to it and are updating appropriately. The NSArrayController manages Core Data entities.

Here's the relevant code:

NSString *SERVICE_URL_BINDING_NAME = @"serviceURL" ;

…

+ (void) initialize
	{
	NSLog( @"Initializing %@" , self ) ;
	[self exposeBinding:SERVICE_URL_BINDING_NAME] ;
	}

- (void) awakeFromNib
{
[self bind:SERVICE_URL_BINDING_NAME
toObject:_blogAccountsController // the NSArrayController in question
withKeyPath:@"arrangedObjects.serviceURL"
options:nil ] ;
}


// The KVC-compliant accessors
- (void) setServiceURL: (NSObject *) serviceURL
	{
	NSLog( @"Setting serviceURL to: %@, value %@" , [serviceURL class] ,
		serviceURL ) ;
	_serviceURL = serviceURL ;
	}

- (NSObject *) serviceURL
	{
	NSLog( @"serviceURL called" ) ;
	return _serviceURL ;
	}


The problem is that setServiceURL: only gets called once some time during application startup, and it is set to an empty array (NSCFArray, value ()). If I add or remove items using the table view (which should change the Core Data model), my accessors aren't called. Shouldn't they be?


What am I missing?

Thanks in advance,

Mike_______________________________________________

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: Custom binding not being updated
      • From: mmalc crawford <email@hidden>
  • Prev by Date: Re: Setting the arrow cursor for an NSTextView
  • Next by Date: Re: NSTreeController and NSTreeNode
  • Previous by thread: Re: NSTreeController and NSTreeNode
  • Next by thread: Re: Custom binding not being updated
  • Index(es):
    • Date
    • Thread