theseanco / howto_co34pt_liveCode

A repository of readmes, techniques, notes and other materials about how i live code in SuperCollider. A (sorta) companion repository to co34pt_livecode
201 stars 32 forks source link

thisProcess.nowExecutingPath returns nil in SC VIM #3

Closed madskjeldgaard closed 6 years ago

madskjeldgaard commented 7 years ago

The setup file does not work on SC Vim (only tried on Mac OSX) and returns this error:

ERROR: Message ‘dirname’ not understood

The problem is somehow the .nowExecutingPath method. According to the docs: “This method is supported in the SuperCollider IDE, the Macintosh-only SuperCollider.app, and the scel (SuperCollider-Emacs-Lisp) environment. In other editor environments, it will return nil.”

Running just thisProcess.nowExecutingPath does in fact return nil. And thus the .dirname method is not understood cause it's run on nil.

I'm not sure what the alternative would be yet but I'll do a little digging

madskjeldgaard commented 7 years ago

Here's a link to the docs http://doc.sccode.org/Classes/Process.html#-nowExecutingPath

theseanco commented 7 years ago

Interesting. If you've cloned the repo would you be able to tell me if any of the ("../../Setup/Setup.scd").loadRelative lines at the starts of examples work? In 3.4 for example

If so you might have to specify absolute paths for everything in SCVim, which would be a shame.

theseanco commented 6 years ago

according to this, nowExecutingPath only works in the SCIDE - so this one's above me!