Does Store.Init Need a global callback function if different LUA files?

I am using Director, so have multiple screens. Short version: If I want to do a store.purchase() on a screen that is a different lua file than the file I call store.init(), does the the callback function need to be a global function?

Long version:
Using director, and have a loading screen and an IAP screen. In the loading screen, I have store.init(transactionCallBack).
transactionCallBack is a local function: local function transactionCallBack(event), and handles the different transaction types appropriately.
store is a global module: store = require("store")

However, when I transition to my IAP screen, the local function is gone. When I call store.purchase(), will it fail because while the store is global, the callback function called by store.init was local to a previous file?

As this is my first IAP program, wanted to just see what people thought before I tried to troubleshoot it. :)

Thanks!
Thy

I do believe that having it as a local will fail come test time, yes.

You could test it quite easily on the Xcode simulator - but if you are using multiple files you will really need to make sure the callback can be seen, which means not making it local outside of the appropriate file as you are currently doing.

views:1775 update:2011/10/15 14:27:43
corona forums © 2003-2011