[ALOY-1525] Alloy Binding without persistence doesn't seem to work anymore
| GitHub Issue | n/a |
|---|---|
| Type | Bug |
| Priority | Critical |
| Status | Closed |
| Resolution | Won't Fix |
| Resolution Date | 2016-11-04T17:54:49.000+0000 |
| Affected Version/s | n/a |
| Fix Version/s | n/a |
| Components | Models |
| Labels | alloy, bindings, samples |
| Reporter | Thomas Wiesen |
| Assignee | Feon Sua Xin Miao |
| Created | 2016-10-05T14:33:04.000+0000 |
| Updated | 2016-11-08T10:58:53.000+0000 |
Description
The sample app
* https://github.com/appcelerator/alloy/tree/master/test/apps/models/binding_no_persistence
fails with the error
* TypeError: Cannot read property '__transform' of undefined (Android) and
* TypeError: undefined is not an object (evaluating '$model.__transform') (iOS) respectively.
Does this mean that it is no more possible to use Alloy Binding without persistence?
Attachments
| File | Date | Size |
|---|---|---|
| binding_no_persistence.zip | 2016-10-05T16:01:49.000+0000 | 7006 |
Hello, I can't access the sample app page. Can you attach the file in here for us to test? Thanks.
I think I didn't add the link properly, sorry. Try this: [https://github.com/appcelerator/alloy/tree/master/samples/apps/models/binding_no_persistence] I also added the sample in question as a zip file.
[~twiesen], binding without persistence still works. You just need to create the model files under
app/modelswith no adapter type. E.g.// app/models/appState.js exports.definition = { config: { "defaults": { counter: 1, color: '#00f' } }, extendCollection : function(Collection) { _.extend(Collection.prototype, { // For Backbone v1.1.2, uncomment this to override the fetch method /* fetch: function(options) { options = options ? _.clone(options) : {}; options.reset = true; return Backbone.Collection.prototype.fetch.call(this, options); }, */ }); return Collection; } }Thank you so much! I wasn't aware of this change and I couldn't find it documented anywhere.