Please forgive me as I’m fairly new to Corona & Lua.
I have downloaded the InAppPurchaseDemo app and also have the Tab menu demo. In my app I would like to display the purchase buttons on the second tab. I have encountered two problems that I’m unsure of the best solution.
What I have found is the ui.lua in the IAP demo app doesn’t use display groups so the iap buttons appear on all tabs. I haven’t tried it yet but I believe that I will be able to modify the ui.lua code to either pass in or return a displayGroup and add the buttons/text to that. It does seem a bit strange to me that the ui.lua code doesn’t use display groups by default or option.
The other issue I’m unsure of how to resolve is that the store.init needs to be run immediately, but the tab code only sets the screen up when the button is clicked.
I’m thinking out loud here but if you have a better solution please let me know.
- Make the change to the ui.lua code to use display groups
- Do the store.init and call back in the main.lua
- Take the display group and set it on a public variable on screen2
- Change screen2 to use that display group and not destroy it when it exits
Any advice or assistance is greatly appreciated.
Scott. [import]uid: 51622 topic_id: 9765 reply_id: 309765[/import]