Titanium Appcelerator Quickie: Android Options Menus - Clearly Innovative | Web and Mobile DevelopmentClearly Innovative | Web and Mobile Development

UPDATE: Looks like this issue has been resolved, see link for additional information

http://appcelerator.lighthouseapp.com/projects/32238/tickets/2762-android-ent-defect-cant-add-menu-to-currentactivity-in-appjs

I have been busy cranking out code for my day job… and trying to get an iPhone App and Android App out so hopefully I can get some additional programming work in the mobile space. Eveyone wants to see an app before the believe you can do it and since I all my work to date has been for the government I got nothing to show.

While venturing deeper into Android development, I finally purchased a droidX… not sure if I am going to keep it or not, but it works as a development device to test on.

One of the problems I found with Titanium  is how option menus work with windows. Basically if you try to create an option menu in the app.js file, it will silently fail… See code below…looks good, but won’t work

to actually make the option menus work, you have to create the menu in a seperate window context. What that means is you have to pass the window a url to a js file that creates the window, like this…

This “win.js” file means the window is in a new context, I guess that is how the menu know which window to associate itself with.