Latest version of Studio, SDK 3.2.2 GA Build targets: Android, mobile web. Host: Linux Mint 14
Using a standard Alloy-generated model.
exports.definition = { config: { columns: { "name": "text", "address": "text" }, adapter: { type: "properties", collection_name: "user" } }, extendModel: function(Model) { _.extend(Model.prototype, { // extended functions and properties go here }); return Model; }, extendCollection: function(Collection) { _.extend(Collection.prototype, { // extended functions and properties go here }); return Collection; } };Want to create a model and set a property in a controller:
var user = Alloy.createModel('user'); user.set({name: "Test Value"}); // user.name is still undefined.Or - trying it this way:
initialize: function() { this.name = 'Test value'; }All this seems real basic. Should be able to say
user.set({name: 'Test Value'});
Have also tried adding a backbonejs initialize():
As a property under config.
As a property under exports.definition.
These are routine operations with backbone.js. Anyone see anything obvious?