Re: NSArrayController: Objects with empty strings
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