native alert and director

I am trying to display a native alert before the display group is return. But I am getting the following error :

Mon Apr 11 09:33:42 MacBook-Pro.local Corona Simulator[437] : kCGErrorIllegalArgument: _CGSFindSharedWindow: WID 720
Mon Apr 11 09:33:42 MacBook-Pro.local Corona Simulator[437] : kCGErrorIllegalArgument: CGSOrderWindowList

here is the code :

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
module(..., package.seeall)
 
function new ()
        local gameGrp = display.newGroup ()
 
...
...
                
                        local function onComplete (event)
                                        
                                local action = event.action
        
                                if event.index == 1 then
                                        if "clicked" == event.action then
                                                print ("click")
                                        end
                                end
                        end
                        
                        local alert = native.showAlert( "Game Info", "It is your turn.", {"OK"}, onComplete)                    
 
 
        return gameGrp -- display group for director
views:1298 update:2011/10/13 9:25:17
corona forums © 2003-2011