• 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
Problem with numbers and property lists
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Problem with numbers and property lists


  • Subject: Problem with numbers and property lists
  • From: Nicola Vitacolonna <email@hidden>
  • Date: Wed, 25 Dec 2002 19:00:55 +0100

Nobody having problems with NS(Decimal)Numbers and property lists?
I have an NSTable that displays formatted real numbers (cells have an
NSFormatter attached).
I initially saved my data structure, an NSDictionary with a key
indexing an NSArray of NSDictionaries (= the table) with
writeToFile:atomically:.
Everything used to work fine with Mac OS X 10.1 and the previous
release of Dev Tools.
Under Mac OS X 10.2.3 and with Dec Tools I have the following problem:
when I open again a previously saved file, numbers are not displayed.
Numbers are NSDecimalNumber.

I fixed this by archiving (NSArchive) my data structure before saving,
but I still have problems. I have implemented copy and paste and drag
and drop among different tables. I write selected records on the
pasteboard with

[pboard setPropertyList:arrayOfSelectedRecords forType:@"my Type"];

where arrayOfSelectedRecords is an array of NSDictionary whose fields
are NSDecimalNumbers.
Again, under Mac OS X 10.1 everything worked fine, but now numbers are
not displayed when pasted.

Please help me, because this is somewhat frustrating. Should
NSDecimalNumbers be property list objects, in that they are a subclass
of NSNumber? Or am I assuming something wrong?

Thanks in advance
Nicola Vitacolonna

** ** Get my PGP public key at:
** * ** * www.dimi.uniud.it/~vitacolo
** * ** * or finger email@hidden
** * Universita' degli Studi di Udine
* ***icola Vitacolonna
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: Problem with numbers and property lists
      • From: Chris Kane <email@hidden>
  • Prev by Date: Re: Best SCM solutions?
  • Next by Date: NSFileManager and -fileManager:shouldProceedAfterError:
  • Previous by thread: Re: How to draw a 1 pixel line?
  • Next by thread: Re: Problem with numbers and property lists
  • Index(es):
    • Date
    • Thread