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

If Else

$
0
0

I was wondering if someone could help me out as I'm a bit lost. My app is made up of several views which consist of parts of a form. There is an option I added that if selected it will skip a particular view. All the views have a home button that allows you to go to the main view of the app. My issue is that when if i skip that particular view and go a couple of views over and click home i get an error because it doesn't recognized the skipped view. Can someone assist in chaining this piece of code to make my app work? Thanks.

home_btn.addEventListener('click', function(e) {
        winone.close();
        wintwo.close(); // this is the view that can get skipped
        winththree.close();
        winfour.close(); // if i am in this view and click home i get an error
        self.close();
    });
The error i get is when i skip wintwo is the following:

'null' is not an object ('evaluating win two.close') at winthree.js


Viewing all articles
Browse latest Browse all 8068

Trending Articles



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