• 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: programatically updating UI for NSArrayContoller/NSTableView combo
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: programatically updating UI for NSArrayContoller/NSTableView combo
      • From: Russell Gray <email@hidden>
References: 
 >programatically updating UI for NSArrayContoller/NSTableView combo (From: Russell Gray <email@hidden>)
 >Re: programatically updating UI for NSArrayContoller/NSTableView combo (From: mmalc Crawford <email@hidden>)
 >Re: programatically updating UI for NSArrayContoller/NSTableView combo (From: Russell Gray <email@hidden>)
 >Re: programatically updating UI for NSArrayContoller/NSTableView combo (From: Quincey Morris <email@hidden>)
 >Re: programatically updating UI for NSArrayContoller/NSTableView combo (From: Russell Gray <email@hidden>)
 >Re: programatically updating UI for NSArrayContoller/NSTableView combo (From: Quincey Morris <email@hidden>)
 >Re: programatically updating UI for NSArrayContoller/NSTableView combo (From: Russell Gray <email@hidden>)
 >Re: programatically updating UI for NSArrayContoller/NSTableView combo (From: mmalc Crawford <email@hidden>)
 >Re: programatically updating UI for NSArrayContoller/NSTableView combo (From: Russell Gray <email@hidden>)

  • Prev by Date: Re: programatically updating UI for NSArrayContoller/NSTableView combo
  • Next by Date: Enabling NSZombieEnabled programatically
  • Previous by thread: Re: programatically updating UI for NSArrayContoller/NSTableView combo
  • Next by thread: Re: programatically updating UI for NSArrayContoller/NSTableView combo
  • Index(es):
    • Date
    • Thread