I found myself in a situation where coffeescript was complaining that Object has no method foo when it clearly did. What is going on? Why is it so hard to call a class method from within a class?
What you see in this example is: ` HON… imma deploying mah airbag! aaaa!
timers.js:103 if (!process.listeners(‘uncaughtException’).length) throw e; ^ TypeError: Object # has no method ‘honk_horn’ at Object._onTimeout (.:29:14) at Timer.list.ontimeout (timers.js:101:19) `
So just change the setTimeout line to have a => instead of ->:
Now it works right. Also notice that the “aaaa!” yell is happening before the “HON…” log statement in both examples. ` HON… imma deploying mah airbag! aaaa! HONK HONK You jerk! `