#44 √ hold
ronin-24766 (at lighthouseapp)

PlotKit integration

Reported by ronin-24766 (at lighthouseapp) | June 28th, 2008 @ 02:14 PM | in Unscheduled

PlotKit doesn't work out of the box with SproutCore, but after much debugging, I've figured out that it's because of the propertyRevision attribute that SproutCore adds to objects. PlotKit.Base.map, PlotKit.Base.items, PlotKit.Base.keys try to iterate over all the attributes of an array and return everything that's not a function, including propertyRevision. This effectively appends propertyRevision to any array passed into the above functions, breaking lots of stuff.

I've created a bootleg monkeypatch to get around it, but I'm wondering if there's a better way to fix it, whether it's on the plotkit or sproutcore side.

Comments and changes to this ticket

  • Charles Jolley

    Charles Jolley June 28th, 2008 @ 02:21 PM

    • → Milestone changed from “” to “Unscheduled”
    • → Tag changed from “bug patch plotkit” to “bug plotkit”
    • → State changed from “new” to “hold”
    • → Assigned user changed from “” to “Charles Jolley”

    This looks like a kind of bug in PlotKit as it should really not iterate over arrays like this since it forces the array to be treated like a hash which is significantly less efficient.

    We could eventually fix SproutCore not to append the propertyRevision key (which is a little ugly anyway), but I recommend that you consider publishing a PlotKit.framework that can be used by anyone working with the SproutCore build tools to add plotting.

    It is very easy to set this up. Please email me at charles@sproutit.com or AIM okitothegreat if you are willing to do this. Everyone will love you. :-)

Please Login or create a free account to add a new comment.

You can update this ticket by sending an email to from your email client. (help)

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

SproutCore: JavaScript Application Framework

Source available from github
The Git repository resides at http://github.com/sproutit

Check out the current development trunk with:
git clone git://github.com/sproutit/sproutcore.git

Creating a bug report

When creating a bug report, be sure to include as much relevant information as possible. Post the code sample that causes the problem. Preferably, alter the unit tests and show through either changed or added tests how the expected behavior is not occuring.

Submitting Patches

Resist adding new tags, use the ones in the tag cloud already. If you are submitting a patch or a pull request from a fork, tag the ticket as a "patch". If you are submitting a new feature enhancement, tag it as "enhancement". If you are submitting a fix for a bug, tag it as "fix".

Thanks!

We're glad you're contributing. Feel free to drop by the Google Group as well to let us know you are involved.

People watching this ticket

Attachments

Tags