Titanium Appcelerator Quickie: Find Top Window in Navigation Group - Clearly Innovative | Web and Mobile DevelopmentClearly Innovative | Web and Mobile Development

This was a question posted in the Appcelerator Q&A and I thought it was an interesting problem so I banged out this solution… It works, could be refactored but I figured I would put it out there since it might be of help for some one.

I really would like to just extend the base NavigationGroup object to provide a easy access to an array of all the windows, a way to pop to the top of the stack and a bunch of other cool things that would be helpful.

Maybe I will add it to my book? Who knows.

when you open a window in the navGroup, use the myOpen method

you can get the top window like this

here is a link to another posting on Navigation Groups in Appcelerator that you might find helpful