tylergaw/day-player

Not working with last beta (3.0.4)

Closed this issue · 1 comments

The plugin doesn't work with the last beta of Sketch. The console app says:

29/05/14 16:28:09,467 Fill Murray (Sketch Plugin)[58693]: ReferenceError: Can't find variable: scriptPath.
Plugin “Fill Murray”, line 3.
» var pluginPath = scriptPath.substring(0, scriptPath.lastIndexOf('/')); «
29/05/14 16:28:09,467 Sketch Beta[58693]: Exception: {
    line = 3;
    stack = "global code";
}

Thanks @jiserra

We were talking about this on the mailing list. Seems leaving the global scriptPath var out was an omission by the Sketch folks. They're going to add it back in, but plan to remove it completely in a future release. Instead of accessing scriptPath globally plugins would access it at sketch.scriptPath

I went ahead and updated my reference to it using sketch.scriptPath in #7

I also updated occurrences of the global-for-now-maybe-not-later doc and selection vars.

Sam at Sketch gave us the details here: http://mail.sketchplugins.com/pipermail/dev_sketchplugins.com/2014-May/000339.html

Thanks for reporting