[AC-398] Error Alloy Data Binding Annotations
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | n/a |
Status | Resolved |
Resolution | Cannot Reproduce |
Resolution Date | 2015-11-11T22:55:30.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | Alloy |
Labels | ios, iphone |
Reporter | Frank Eijking |
Assignee | Shak Hossain |
Created | 2015-03-19T07:29:50.000+0000 |
Updated | 2015-11-11T22:55:30.000+0000 |
Description
I try to use annotations as a collection inside a ti.map module Modules.Map.View.
Documentation says this is possible as of Alloy 1.4: [Alloy_Data_Binding](http://docs.appcelerator.com/titanium/3.0/#!/guide/Alloy_Data_Binding)
Please consider the following in my view xml:
{noformat}
{noformat}
In my controller I do a
{noformat}
Alloy.Collections.pins.fetch();
{noformat}
Everything works fine for the above TableView.
However for both above $.mapView's which contain the same dataCollection attribute as the TableView, I get the following error:
*[ERROR] message = "null is not an object (evaluating '$model.__transform')";*
Which according to Tony Lukasavage comment in the following post [undefined-is-not-an-object-evaluating-modeltransform](https://developer.appcelerator.com/question/155544/undefined-is-not-an-object-evaluating-modeltransform) means: "...you're attempting to use data binding notation on elements that are not inside an element with a dataCollection..."
I am using Ti SDK 3.5.1.GA and Alloy 1.5.1, testing on iOS Simulator 8.2
Does anybody succesfully used Annotations for a dataCollection as of Alloy 1.4+?
Also tested with Alloy 1.7.0-dev and 1.4.0, same issue.
Hello, This issue could not be reproduced. Following test case shows Alloy data binding works properly with ti.map module. *Testing Environment:* Appcelerator Studio, build: 4.2.0.201508141038 Titanium SDK: 4.1.0 GA Alloy version : 1.7.6 iOS simulator: iphone 5s(v8.1) OS X version: 10.9.5 *Steps to reproduce:* 1. Create an alloy project 2. Add ti.map module 2. Copy following test cases in respective files. 2. Run the app. Observe that data binding annotation is working perfectly with the ti.map module. *Test Case* index.xml
index.js
pins.js
index.tss
Thanks