Re: programatically updating UI for NSArrayContoller/NSTableView combo
Re: programatically updating UI for NSArrayContoller/NSTableView combo
- Subject: Re: programatically updating UI for NSArrayContoller/NSTableView combo
- From: mmalc Crawford <email@hidden>
- Date: Sat, 09 Jan 2010 14:29:48 -0800
On Jan 9, 2010, at 2:15 pm, Russell Gray wrote:
> [subscriptionsArray addObject:output];
>
You haven't shown where you're modifying 'subscriptions' (apart from in the init method).
Do you have two arrays that mirror each other, subscriptions and subscriptionsArray?
Otherwise, if this is a typo (and it's helpful to see the code you're actually using...), then:
On Jan 9, 2010, at 3:29 am, Quincey Morris wrote:
> There are two ways you can update the "subscriptions" property KVO-compliantly:
>
you (Russell) still don't seem to have followed this advice...
Some of the rest of the code seems somewhat confused. For example:
int i = 0;
for (NSDictionary *child in subscriptionsArray)
{
NSDictionary* subscriptionsDictionary = [subscriptionsArray objectAtIndex:i];
SubscriptionInfo* subscriptionInfo = [[[SubscriptionInfo alloc] initWithInfoDictionary: subscriptionsDictionary] autorelease];
[subscriptions addObject: subscriptionInfo];
i++;
}
What is the point of the unused child iterator variable? Should your code not look more like:
for (NSDictionary *child in subscriptionsArray)
{
SubscriptionInfo* subscriptionInfo = [[SubscriptionInfo alloc] initWithInfoDictionary:child];
[subscriptions addObject: subscriptionInfo];
[subscriptionInfo release];
}
mmalc
_______________________________________________
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