error when adding view. why?
I'm trying to create a view using the following syntax, and the emulator is telling me that I cannot call property CreateView, and I'm not sure what the deal is.
Here is my code. Creating the window and label works fine.
var windetails = null;
windetails = Titanium.UI.createWindow({
url:'details.js',
pk:e.rowData.id,
lat:e.rowData.lat,
lon:e.rowData.lon,
caption:e.rowData.title,
info:e.rowData.info,
});
//alert(e.rowData.id);
//alert(e.rowData.lat);
//alert(e.rowData.lon);
//alert(e.rowData.title);
//alert(e.rowData.info);
var label1=Titanium.UI.createLabel({
text:e.rowData.title
});
var cap=Titanium.UI.CreateView({
borderRadius:10,
top:10,
width:270,
height:300,
text:info
});
1 Answer
-
Javascript is case-sensitive. It should be createView not CreateView.