New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
loop() not implemented? #16
Comments
Yeah, i have that on my list ... not sure what's up. |
Unfortunately. loop
print '.'
break if finished ... so you'll have to figure something out. |
Aha, i speculated about that as being the problem but could not find anything in the CS docs right away. Is there a structured documentation that let's me see these things easily? CoffeeScript.org does not list the keywords for example .. Thanks! |
Just this sentence:
And the actual list of keywords in the Lexer: http://coffeescript.org/documentation/docs/lexer.html#section-60 |
K, thanks. I'll fix this later today. |
Not a permanent solution per se but I had started a thread on the Processing forums to confirm that there was a problem with loop() before posting an issue. After incorporating the feedback received here, a user aptly named "GoToLoop" stumbled upon a work around which is to use CS's ability to insert raw JS through backticks. Sure enough, using
will cause loop() to work as expected: http://forum.processing.org/topic/loop-not-implemented-in-coffeescript-mode#25080000002152759 By the way, does CS mode allow one to access PJS's internal variables? |
I added "doLoop" as replacement for "loop" and added a check/warning to the compiler. Plus, there is an example showing the use of both the loop control structure and the noLoop() / doLoop() combo. Should be closed by commit aca5315 please update your mode using the mode manager. |
sweet! thank you my friend. |
I was creating a simple on/off switch for a sketch using keyPressed() as I often do when debugging and println-ing lots of stuff. I was able to get the sketch to stop using noLoop(), however, when I added loop() the sketch won't even load. When I comment out Loop() the sketch works again.
I do not believe it is my code because the equivalent JS version works as expected. The following error prints in the IDE console. Firebug does not report anything.
The text was updated successfully, but these errors were encountered: