I have a controller object "Controller" of Class Name "AdBlockerPreferences", with the outlet connected to the Array Controller. the Array Controller's content is bound to Controller.subscriptions the Array Controller has the preference "Prepares Content" checked.
.....I also have File's Owner with the Class identity of "AdBlockerPreferences" could this be my problem? in my AdBlockerPreferences.h file just the relevant stuff: AdBlockerPreferences : NSPreferencesModule { IBOutlet id subscriptionTableView; IBOutlet id subscriptionsArrayController; NSMutableArray* subscriptions; } - (NSMutableArray *)subscriptions; - (void)openABPFeed:(NSURL*)feed; @property (retain) id subscriptionTableView; @property (retain) id subscriptionsArrayController; @property (retain,getter=subscriptions) NSMutableArray* subscriptions; and my AdBlockerPreferences.m @implementation AdBlockerPreferences @synthesize subscriptionTableView, subscriptions, subscriptionsArrayController; - (id) init { if (self = [super init]) { // build up some sample data subscriptions = [[NSMutableArray alloc] init]; NSString *applicationSupportFolder = [SABApplicationSupportFolderPath stringByExpandingTildeInPath]; NSString *subscriptionsPlistPath = [applicationSupportFolder stringByAppendingPathComponent:SABSubscriptionsPlistFullName]; NSArray* subscriptionsArray = [NSArray arrayWithContentsOfFile:subscriptionsPlistPath]; int i = 0; for (NSDictionary *child in subscriptionsArray) { NSDictionary* subscriptionsDictionary = [subscriptionsArray objectAtIndex:i]; SubscriptionInfo* subscriptionInfo = [[[SubscriptionInfo alloc] initWithInfoDictionary: subscriptionsDictionary] autorelease]; [subscriptions addObject: subscriptionInfo]; i++; } } return self; } - (void) dealloc { [subscriptions release]; [subscriptionsArrayController release]; [super dealloc]; } - (NSMutableArray*) subscriptions { return subscriptions; } - (void)openABPFeed:(NSURL*)feed { /////////////////////////removed // Create our Subscriptions plist file. NSDictionary *output; output = [NSDictionary dictionaryWithObjectsAndKeys:title, @"feedNameKey", urlString, @"feedURLKey", defaultValue, @"feedUpdatedKey", nil]; SubscriptionInfo* subscriptionInfo = [[[SubscriptionInfo alloc] initWithInfoDictionary: output] autorelease]; [subscriptionsArray addObject:output]; // Write the Subscriptions plist file. [subscriptionsArray writeToFile:subscriptionsPlistPath atomically:YES]; //////////none of these are working... //[subscriptionsArrayController addObject: subscriptionInfo]; //[[self mutableArrayValueForKey: @"subscriptions"] addObject: subscriptionInfo]; //[[self mutableArrayValueForKey: @"subscriptions"] insertObject: subscriptionInfo atIndex: [subscriptions count]]; //[subscriptionsArrayController insertObject: subscriptionInfo atArrangedObjectIndex: [[subscriptionsArrayController arrangedObjects] count]]; int x = [subscriptionsArray count]; [[[[AdBlockerUpdater alloc] init] autorelease] updateFeedWithPreferences:self atIndex:x]; } and I call open openABPFeed: from another class, like so: [[AdBlockerPreferences sharedInstance] openABPFeed:[request URL]]; I also tried this (just to make sure its happening on the main thread: [[AdBlockerPreferences sharedInstance] performSelectorOnMainThread:@selector(openABPFeed:) withObject:[request URL] waitUntilDone:YES]; not sure what else I would need to do? On 10/01/2010, at 8:59 AM, mmalc Crawford wrote: > > On Jan 9, 2010, at 1:50 pm, Russell Gray wrote: >> On 10/01/2010, at 8:18 AM, Quincey Morris wrote: >>> How about if you register your own KVO observer of the "subscriptions" >>> property? Does it get notified when the property changes? Did you check the >>> log for exception error messages? >> So, I added an observer to my awakeFromNIb: >> [subscriptionsArrayController addObserver: self >> forKeyPath: @"arrangedObjects" >> options: NSKeyValueObservingOptionNew >> context: NULL]; >> > > Quincey did suggest observing the subscriptions property... > >> what would be my next plan of attack here? >> > Re-read the KVO Programming Guide and the Cocoa Bindings Programming Guide, > and review the myriad examples that show how to do this to see how yours > differs. > Seeing the code you're using to modify the subscriptions property would also > be useful. > > mmalc > > _______________________________________________ > > Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) > > 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: > http://lists.apple.com/mailman/options/cocoa-dev/sweetpproductions%40gmail.com > > This email sent to sweetpproducti...@gmail.com _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com