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/



_______________________________________________
Bug-gnustep mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-gnustep

Reply via email to