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

NSArrayController: Objects with empty strings


  • Subject: NSArrayController: Objects with empty strings
  • From: MyApps <email@hidden>
  • Date: Tue, 28 Apr 2009 16:59:48 +0200

Hi list,

I am new to the cocoa development. I have some question to NSArrayController

I add an object to the controller array like this:

CODE ##############################################################################

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


[myArrayController addObject:theDicRow];

CODE ##############################################################################


This works great and do its job. I can call the object from the content an get the log result like this:

CODE ##############################################################################

[2355:10b] (
        {
        colA = "Text A";
        colB = "Text B";
    }
)

CODE ##############################################################################

Well, this is okay.


If I do this:

CODE ##############################################################################

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


CODE ##############################################################################


The result is:

CODE ##############################################################################

[2355:10b] (
        {
        colA = "Text A";
    }
)

CODE ##############################################################################

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.
How can I change this reaction with empty strings? I need this @"" Strings.


Thank you for information!
_______________________________________________

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: NSArrayController: Objects with empty strings
      • From: Keary Suska <email@hidden>
  • Prev by Date: Group Identity Programming
  • Next by Date: Storing a table view in user defaults
  • Previous by thread: Re: Group Identity Programming
  • Next by thread: Re: NSArrayController: Objects with empty strings
  • Index(es):
    • Date
    • Thread