• 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: insert a plist in a NSTableView using a NSDictionary
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: insert a plist in a NSTableView using a NSDictionary


  • Subject: Re: insert a plist in a NSTableView using a NSDictionary
  • From: NSTask <email@hidden>
  • Date: Wed, 26 Sep 2007 09:36:18 +0200

On 9/26/07, mmalc crawford <email@hidden> wrote:
>
>
> On Sep 26, 2007, at 12:14 AM, NSTask wrote:
> > First debugging I would suggest you to do is to nslog plistDictionary
> > contents. It looks like your dictionary
> > is empty. Can you paste sample of your file contents.
> >
> This continues to be misleading...





> On 9/25/07, deepak gopal <email@hidden> wrote:
> >> I am using NSArrayController to load two columns of a table View
> >> and the
> >> Method I am using is
> >>
> >> - (void)loadArrayController {
> >>
> >>  NSDictionary *plistDictionary = [NSDictionary
> >> dictionaryWithContentsOfFile:kPlistPath];
> >>
> >>  NSMutableDictionary *newDictionary = [NSMutableDictionary
> >> dictionary];
> >>
> >>  [newDictionary setValue:[plistDictionary allKeys]
> >> forKey:@"Methods"];
> >>
> >>  [newDictionary setValue:[plistDictionary allValues]
> >> forKey:@"Address"];
> >>
> >>  [tableViewController_ addObject:newDictionary];
> >> }
> >>
> >> and I am getting only brakets in both the fields.
> >> What am I doing wrong? or how else should I do this?
> >>
> Per my earlier reply:
> **** Do not use bindings/NSArrayController for this task ****
>
> (a) It's not suitable technology for a newcomer to Cocoa.
> (b) NSArrayController cannot simply manage a dictionary.



I agree that nsarraycontroller can not manage a dictionary well
and you should go for the earlier code suggested by mmalc.

/S

p.s. prev. reply was just the answer of the question not a suggestion for
implementation.
_______________________________________________

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

References: 
 >Re: insert a plist in a NSTableView using a NSDictionary (From: NSTask <email@hidden>)
 >Re: insert a plist in a NSTableView using a NSDictionary (From: mmalc crawford <email@hidden>)

  • Prev by Date: Re: insert a plist in a NSTableView using a NSDictionary
  • Next by Date: Re: NSTask -launch override
  • Previous by thread: Re: insert a plist in a NSTableView using a NSDictionary
  • Next by thread: -[NSInvocation length]: selector not recognized [self = 0x30abd0]
  • Index(es):
    • Date
    • Thread