Quantcast
Channel: Appcelerator Developer Center Q&A Unanswered Questions 20
Viewing all articles
Browse latest Browse all 8068

Can't find a variable that I know I have defined.

$
0
0

[ERROR] : Script Error { [ERROR] : column = 6; [ERROR] : line = 101; [ERROR] : message = "Can't find variable: view5";

I have defined this variable here..

var playNow = function(){ var playWindow = Ti.UI.createWindow({ title: "Those Still Playing", }); nav1.openWindow(playWindow);

var tbHome = require("qbBradyHome");

//this is where you paste and change the labels and views and boxes and images var box2 = Ti.UI.createView({ height: 250, width: 250, top: 20, });

//Now add another image from the images folder

var img2 = Ti.UI.createImageView({ image: "Images/" + "NFL Those Playing Now.jpg", });

//Time to format the buttons that will lead us down the rabbit hole; thankfully we have the Navigation window in place above var view5 = Ti.UI.createView({ backgroundColor: "f1f1f1", height: 50, width: 300, borderColor: "black", top: box2.height + 30, });

//Now lets put some text on the label var lab5 = Ti.UI.createLabel({ text: "Tom Brady", font: { fontFamily: "Arial", fontSize: 20}, color: "Black", });

//Now, do it again but change the text on the view and the top height var view6 = Ti.UI.createView({ backgroundColor: "f1f1f1", height: 50, width: 300, borderColor: "black", top: view1.top + view1.height + 20, }); //Now lets put some text on the label var lab6 = Ti.UI.createLabel({ text: "Peyton Manning", font: { fontFamily: "Arial", fontSize: 20}, color: "Black", });

//Now, do it again but change the text on the view and the top height var view7 = Ti.UI.createView({ backgroundColor: "f1f1f1", height: 50, width: 300, borderColor: "black", top: view2.top + view2.height + 20, }); //Now lets put some text on the label var lab7 = Ti.UI.createLabel({ text: "Aaron Rodgers", font: { fontFamily: "Arial", fontSize: 20}, color: "Black", });

//Now, do it again but change the text on the view and the top height var view8 = Ti.UI.createView({ backgroundColor: "f1f1f1", height: 50, width: 300, borderColor: "black", top: view3.top + view3.height + 20, }); //Now lets put some text on the label var lab8 = Ti.UI.createLabel({ text: "Drew Brees", font: { fontFamily: "Arial", fontSize: 20}, color: "Black", });

//Now let's add the image to the box box2.add(img2);

//Now lets add all the views to the labels view5.add(lab5); view6.add(lab6); view7.add(lab7); view8.add(lab8);

//finally lets add the box and all the views/buttons, then open the nav1 window playWindow.add(box2, view5, view6, view7, view8);

};

view1.addEventListener("click", playNow);


This is the page that is keeping me from moving on

var qbBradyHome = function(){ var bradyWindow = Ti.UI.createWindow({ title: "Tom Brady", }); nav1.openWindow(bradyWindow);

var box6 = Ti.UI.createView({ height: 250, width: 250, top: 20, });

//Now add another image from the images folder

var img6 = Ti.UI.createImageView({ image: "Images/" + "QB Home Page Tom Brady.jpg", });

//Time to format the buttons that will lead us down the rabbit hole; thankfully we have the Navigation window in place above var view21 = Ti.UI.createView({ backgroundColor: "f1f1f1", height: 50, width: 300, borderColor: "black", top: box6.height + 30, });

//Now lets put some text on the label var lab21 = Ti.UI.createLabel({ text: "Early Years", font: { fontFamily: "Arial", fontSize: 20}, color: "Black", });

//Now, do it again but change the text on the view and the top height var view22 = Ti.UI.createView({ backgroundColor: "f1f1f1", height: 50, width: 300, borderColor: "black", top: view21.top + view21.height + 20, }); //Now lets put some text on the label var lab22 = Ti.UI.createLabel({ text: "College Years", font: { fontFamily: "Arial", fontSize: 20}, color: "Black", });

//Now, do it again but change the text on the view and the top height var view23 = Ti.UI.createView({ backgroundColor: "f1f1f1", height: 50, width: 300, borderColor: "black", top: view22.top + view22.height + 20, }); //Now lets put some text on the label var lab23 = Ti.UI.createLabel({ text: "Professional Years", font: { fontFamily: "Arial", fontSize: 20}, color: "Black", });

//Now, do it again but change the text on the view and the top height var view24 = Ti.UI.createView({ backgroundColor: "f1f1f1", height: 50, width: 300, borderColor: "black", top: view23.top + view23.height + 20, }); //Now lets put some text on the label var lab24 = Ti.UI.createLabel({ text: "Statistics", font: { fontFamily: "Arial", fontSize: 20}, color: "Black", });

//Time to call up the next four pages or .js files that will link to the four buttons/views

var tbEarly = require ("qbBradyEarly"); var tbColl = require ("qbBradyCollege"); var tbPro = require ("qbBradyPro"); var tbStat = require ("qbBradyStats");

//Now let's add the image to the box box6.add(img6);

//Now lets add all the views to the labels view21.add(lab21); view22.add(lab22); view23.add(lab23); view24.add(lab24);

//finally lets add the box and all the views/buttons, then open the nav1 window bradyWindow.add(box6, view21, view22, view23, view24);

}; view5.addEventListener("click", qbBradyHome);

Any help is greatly appreciated

Eric Wilson eewilson99@gmail.com


Viewing all articles
Browse latest Browse all 8068

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>