bug-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug #12801] string starting with '{' in a PL is read as dictionary


From: Benhur Stein
Subject: [bug #12801] string starting with '{' in a PL is read as dictionary
Date: Mon, 25 Apr 2005 13:23:43 +0000
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.7) Gecko/20050418 Firefox/1.0.3

URL:
  <http://savannah.gnu.org/bugs/?func=detailitem&item_id=12801>

                 Summary: string starting with '{' in a PL is read as
dictionary
                 Project: GNUstep
            Submitted by: benhur
            Submitted on: Seg 25-04-2005 em 13:23
                Category: Base/Foundation
                Severity: 2 - Minor
              Item Group: Bug
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open

    _______________________________________________________

Details:

If a string starting with the '{' character is stored in a property list, it
is read as a dictionary, not as a string.
The following code does not work, cellSizeString is read as nil:

    [[NSUserDefaults standardUserDefaults] 
                      setObject:NSStringFromSize(cellSize) 
                         forKey:@"StatViewerCellSize"];

    /* ... */
    cellSizeString = [[NSUserDefaults standardUserDefaults]
                            stringForKey:@"StatViewerCellSize"];
    if (cellSizeString != nil) {
        cellSize = NSSizeFromString(cellSizeString);
    }


When looking at the .GNUstepDefaults file, this string is properly written
surrounded by quotes, while dictionaries are written without the quotes.
A similar problem probably exists with arrays and data.
Not sure how to make the distinction when writing a default value using the
"defaults" tool, though.

Benhur






    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?func=detailitem&item_id=12801>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]