Extremely frustrated -- extranious tap events

First, is the tap event supported? If it isn’t then I’d like to know. If it is supported, is there documentation?

In my app, I allow the user to select and create new on-screen objects. There are 15 possible objects. The UI to do this is done by bringing up a single window with all 15 objects visible. The user touches one object, the window with the 15 objects disappears, and the new object appears.

This new object has touch and tap events assigned to it.

In 14 of those objects, everything works exactly as it should. In one of those objects, touching the object the object on the selection screen works, but once the object select screen goes away, it immediately triggers a tap event on that object.

I’ve worked under the assumption this is something wrong with my code. And it still may be. I can’t really put the code here, as there’s far too much to view.

But here’s why I’m confused. I can compare the code for this object with the code for other objects that are similar. The code is exactly the same, within the needed variations. For example, here’s the touch event code:

No problem with this object:

function addRArcL(event)  
 local t = event.target  
 local phase = event.phase  
 if ( event.phase == "ended" ) then  
 rarclIndex = rarclIndex + 1  
 bldRArcL(rarclIndex)  
 display.getCurrentStage():setFocus(nil)  
 addObjectWindowEnd()  
 end  
 return true  
end  

Now the event handled that eventually adds the tap event:

function addRArcR(event)  
 local t = event.target  
 local phase = event.phase  
 if ( event.phase == "ended" ) then  
 rarcrIndex = rarcrIndex + 1  
 bldRArcR(rarcrIndex)  
 display.getCurrentStage():setFocus(nil)  
 addObjectWindowEnd()  
 end  
 return true  
end  

From what I can tell I’ve done everything right. I did the setFocus(nil). I returned true.

Is there *anything* I can check? I’ve traced it far enough back so that I know it’s triggered by an event, and the event isn’t triggered intentionally, and I’m running out of ideas.

Sean.
[import]uid: 4993 topic_id: 8234 reply_id: 308234[/import]