Director class : MAJOR BUG!

If you click on a button that's on a screen being changed from bfore the screen has fully transitioned it causes the next screen to be transitioned to again. This causes a crash on the device.

Ricardo (or anyone) how can this be fixed? TA!

add/remove the touch event listeners from the buttons after the transition? there's a transition complete event presumably?

No that won't help as the problem is caused because the listeners are still active DURING the transition.

I think i need to remove them BEFORE the transition call.

Do you get an error like this: (Segmentation or Bus error!)

Copyright (C) 2009-2010 A n s c a , I n c .
Version: 2.0.0
Build: 2010.243
The file sandbox for this project is located at the following folder:
(/Users/derwydd/Library/Application Support/Corona Simulator/game4-60DFA3011116F87540F7FEE1BC2D16E2)
/Applications/Corona.243/Corona Terminal: line 9: 528 Segmentation fault "$path/Corona Simulator.app/Contents/MacOS/Corona Simulator" $*
logout

Don't know as I fixed it by clearing the touch listeners prior to the director change scene call

Yep, I have no touch Listeners on this screen!
I have timers and eventListeners.

I removed all eventListeners to see if that was the cause, and it is not!

1
2
3
4
5
/Applications/Corona.243/Corona Terminal: line 9:  2214 Bus error               "$path/Corona Simulator.app/Contents/MacOS/Corona Simulator" $*
logout
 
 
[Process completed]

Are we suppose to be removing or stopping timers and EventListeners manually?

Solved:
The button handler was causing the issue. I went through and commented everything out. Last of course was the button handler. I switched it over to Ricardo's button example, and that did it.

This does not work:

1
2
3
4
5
6
7
8
9
        local btnPlay = ui.newButton{
                default = "images/play.png",
                over = "images/play.png",
                onEvent = playHandler,
                id = "playBtn",
                text = "",
                size = 12,
                emboss=true
        }

Guys, please write your questions at Director's sub-forum. I don't have too much time to answer and I really didn't see most of the topics created for Director. I'm sorry for that and I will appreciate if you all could go to this link:

http://developer.anscamobile.com/forums/director-class

I am too getting "367 Segmentation Fault" in my app and my app is crashing.Is this a Director Problem? I am just not able to understand the problem that I am facing. Can anybody help me?
Thanks in advance..

views:1772 update:2011/9/25 12:40:18
corona forums © 2003-2011