varvet / serenade.js

Client side MVC framework
http://serenadejs.org
Other
524 stars 27 forks source link

Serenade.format does not respect function binding #71

Closed ghost closed 11 years ago

ghost commented 11 years ago
class Moo
  @property "rawr"
    format: -> @get("rawr")

The above example will raise an error about window.get being undefined in Serenade. You can’t use a double-arrow for coffee-script either since it’ll place you in the context of Moo instead of the Moo instance.

Luckily the format function still receive the value to be formatted as a parameter, but you still cannot access other properties from the same instance.