2 questions: Lua 5.2 and transitions

Hi, I have the following 2 questions:

  1. Lua 5.2 deprecates the “module” facility. I noticed that many Corona developers are basing their development on that facility. Will Corona SDK move along with Lua 5.2 or will developers have to migrate away from the 5.1 “module” approach?

  2. When a display group is undergoing a transition [transition.to( )], does it still receive events? Is it necessary to place a transparent group in front of transitioning display groups to shield other groups from any event that would occur during a transition?
    [import]uid: 59054 topic_id: 10039 reply_id: 310039[/import]

  1. Yes, many codes shared by community are based on module. If Ansca decided to move to Lua 5.2 then developers should adapt with it. I myself prefer not to use module too much, for keeping global variables clean. You may see http://lua-users.org/wiki/LuaModuleFunctionCritiqued for critiques on module usage.

  2. Even when you shield transparent group on top of display object, there are certain events that got fired such as touch events. So my suggestion is before you transition, remove the event listener, then oncomplete, reattach the listener [import]uid: 41267 topic_id: 10039 reply_id: 36614[/import]

For 2), are you sure?

I set up my event shield like this:

stageEventShield:addEventListener(“touch”, function() return true end)

Since this event listener returns true always, are you sure display groups beneath the shield will receive touch events?
[import]uid: 59054 topic_id: 10039 reply_id: 36616[/import]

@Cerberus
Oh i though you just put transparent display group on top of it without any event cancellation code.

I dont know you also attach listener code on that transparent display group. Yes your code could ‘shield’ the event if you do it that way :slight_smile: [import]uid: 41267 topic_id: 10039 reply_id: 36617[/import]