This is a read-only archive of the Framer Community on Facebook.

What is Framer? Join the Community
Return to index
Adria Jimenez
Posted Apr 15 - Read on Facebook

Any idea why this inheritance not working?
http://share.framerjs.com/2ea0bgudyrvp/

The code:
Layer::__on = Layer::on
Layer::on = (event, fn, context) ->
....print 1
....Layer::__on event, fn, context

layer = new Layer

layer.on Events.Click, ->
....print "It works!"

(dots only used for indentation, check the link for normal code)

1 Comments

Adria Jimenez

This other example with a new class is not working either. So far I could only reproduce it with the .on method. Other methods override works fine. Any idea Koen Bok ?
http://share.framerjs.com/rc39h0t222nh/

Read the entire post on Facebook