Skip to content
This repository has been archived by the owner on Aug 13, 2020. It is now read-only.

Don't seem to work with Exoskeleton #5

Closed
pirj opened this issue Aug 24, 2014 · 3 comments
Closed

Don't seem to work with Exoskeleton #5

pirj opened this issue Aug 24, 2014 · 3 comments

Comments

@pirj
Copy link

pirj commented Aug 24, 2014

var U = Backprop.Model.extend({})
u=new U()
u.on('change', function(){console.log('changed')})
u.set('a', 1)
changed 
u.a
undefined
u.b=3
3 // notice no 'changed' event too
u.get('b')
undefined
@pirj
Copy link
Author

pirj commented Aug 25, 2014

Got the trick, need to define these properties first in model.

@pirj pirj closed this as completed Aug 25, 2014
@af
Copy link
Owner

af commented Aug 25, 2014

Thanks for following up! Unfortunately backprop can only manage properties that are created ahead of time. Let me know if you think the docs are unclear on this, maybe I should add a note.

@pirj
Copy link
Author

pirj commented Aug 25, 2014

Yes, probably. I had to fall back to Backbone and walk through example from README to realize that.

af added a commit that referenced this issue Aug 30, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants