Titanium Community Questions & Answer Archive

We felt that 6+ years of knowledge should not die so this is the Titanium Community Questions & Answer Archive

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
        });
— asked October 24th 2010 by Josh Lewis
  • view
0 Comments

1 Answer

  • Javascript is case-sensitive. It should be createView not CreateView.

    — answered October 24th 2010 by John McKnight
    permalink
    0 Comments
The ownership of individual contributions to this community generated content is retained by the authors of their contributions.
All trademarks remain the property of the respective owner.