Closed tatecarson closed 8 years ago
Also, class and method lookup isn't working for anything from the default library. Not sure if that's related. This has changed since the atom-sc update.
Confirmed. If you turn on debug in the settings then it posts the stdin/stdout traffic:
debug
SUPERCOLLIDERJS:f8c96e50-433f-11e6-8f4d-5d1519826968:CAPTURE:START
SUPERCOLLIDERJS:f8c96e50-433f-11e6-8f4d-5d1519826968:CAPTURE:END
SUPERCOLLIDERJS:f8c96e50-433f-11e6-8f4d-5d1519826968:START:Result
SUPERCOLLIDERJS:f8c96e50-433f-11e6-8f4d-5d1519826968:CHUNK:"a Routine"
SUPERCOLLIDERJS:f8c96e50-433f-11e6-8f4d-5d1519826968:END:Result
SUPERCOLLIDERJS.interpreted
->
hi
/Users/crucial/supercolliderjs/lib/utils/logger.js:105 debug hello
So capture is somehow not enabled for that first hi.
Is class/method lookup working for non-default library items ?
Does your project have SCClassLibrary added like this:
and do you have a .tags and/or .tags1 file in your project root ? It needs to stick it somewhere so you do need to have a project not just open atom and work with an unsaved file.
Class method lookup works for Extensions and quarks. My tree looks like that..project folder SCClassLibrary Extensions then Quarks. There's a .tags and .tags1 in my project folder. When I turn on debug nothing seems to happen. Is that in the post window or somewhere else?
debug posts to the console: option-command-i
try Rebuild Tags and look in the console to see if atom-ctags is posting any errors.
fixed.
I understand now what happens. The state parser (sclang-io) is capturing the output of the evaluation. The result is "a Routine" - but in the same STDOUT blurp sclang forks and posts "hi" before it returns "a Routine"
Thanks very much for the clear and reproducible report !
I do unit tests with these to make sure the state parser is solid:
{"hi".postln; 1.wait; "hello".postln}.fork
This code, only in atom, returns hello, instead of hi and then hello. Any idea why? I'm trying to schedule other processes and not sure why it isn't working.
Tdef does work as expected but not task or routine.
Thanks.