I’m trying to change some otherwise working code by pulling all the classes into separate files. This works for most classes, except for the part where it reads class window.Timeline. The error message reads ReferenceError: window is not defined
Any suggestions?
It sounds like your file containing that class isn’t getting loaded into the window context. Is it possible that it got loaded in the context of another class? Could you post some cod examples in a jsFiddle?
The pattern that I usually follow when exporting coffeescript symbols to the parent context is
If you are using a modern browser and know how to access the debugging console, you could put
At the end of the file that is throwing the reference error. This will allow you to have a look to see what the
thiscontext is, which may help you troubleshoot.