• 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: NSArrayController: Objects with empty strings
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSArrayController: Objects with empty strings


  • Subject: Re: NSArrayController: Objects with empty strings
  • From: Greg Guerin <email@hidden>
  • Date: Tue, 28 Apr 2009 12:39:55 -0700

MyApps wrote:

But I wanna have the empty string back. So it seems, that the empty string is converted to nill and the controller is killing them out.


This works fine for me.

CODE:
  NSMutableDictionary* dict =
    [NSMutableDictionary dictionaryWithObjectsAndKeys:
      @"Text A", @"colA",
      @"", @"colB",
     nil ];

  NSLog( @"dict: %@", dict );

OUTPUT:
2009-04-28 12:31:39.881 foo[2471] dict: {colA = "Text A"; colB = ""; }


The controller could still be "killing them out" as you put it, but the problem is not because the empty string is nil. The dictionary is definitely being created with the key "colB" having a value of an empty string.

  -- GG

_______________________________________________

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


  • Prev by Date: Re: NSArrayController: Objects with empty strings
  • Next by Date: Re: Repositioning the Field Editor
  • Previous by thread: Re: NSArrayController: Objects with empty strings
  • Next by thread: Storing a table view in user defaults
  • Index(es):
    • Date
    • Thread