Giter Site home page Giter Site logo

Comments (6)

GoogleCodeExporter avatar GoogleCodeExporter commented on July 17, 2024
I would rather fix the toString() method, so that it does not add a decimal dot 
to integers. I will implement that behavior that when I have time. That should 
solve the problem you have.

Original comment by daniel.dreibrodt on 19 Sep 2014 at 3:29

  • Changed state: Accepted
  • Added labels: Type-Enhancement
  • Removed labels: Type-Defect

from plist.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 17, 2024
That won't work for NextStep plists, because the code tries to store gigantic 
numbers like 100000000000002900000044 as Doubles. This seems to be rooted in 
the problem that numbers and strings look the same in NextStep plists, and the 
code tries to autodetect which type you want, which isn't really possible.

In your solution, what happens if I want to store a string "10.0"? I believe 
the autodetection logic will think it is a double, store it as a 10.0, and the 
toString method will remove the ".0".

Original comment by [email protected] on 19 Sep 2014 at 5:07

  • Added labels: ****
  • Removed labels: ****

from plist.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 17, 2024
I realized I neglected to mention that these numbers are just too big to store 
as Doubles, so the auto-detection logic loses data.

Original comment by [email protected] on 19 Sep 2014 at 5:09

  • Added labels: ****
  • Removed labels: ****

from plist.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 17, 2024
After reexamining the few documents still available about ASCII property lists 
I came to the conclusion that I should remove the part from the parser that 
attempts to parse numerical strings as numbers. In GnuStep there is an explicit 
syntax for storing NSNumbers (<*I1234> or <*R12.34>) but other formats handle 
numbers as strings. So for conformity with the existing systems the automatic 
conversion of numeric strings into NSNumbers will be removed. Then such 
property lists as the ones you are working with should work fine. If a user 
wants to have a number from a string he can do the conversion himself, because 
is a rather trivial task. What would you say?

Original comment by daniel.dreibrodt on 22 Sep 2014 at 9:14

  • Added labels: Type-Defect
  • Removed labels: Type-Enhancement

from plist.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 17, 2024
Yes, that seems much cleaner, and I'm happy with doing conversion explicitly. I 
didn't realize there was a special syntax for NSNumbers, since I've been using 
dd_plist almost exclusively on xcodeproj files, which I don't believe ever use 
that syntax.

Thanks,
Matt

Original comment by [email protected] on 23 Sep 2014 at 4:19

  • Added labels: ****
  • Removed labels: ****

from plist.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 17, 2024
Should be fixed in r111

Original comment by daniel.dreibrodt on 23 Sep 2014 at 6:23

  • Changed state: Fixed
  • Added labels: ****
  • Removed labels: ****

from plist.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.