a listener calling another listener?

I am trying to implement polling ( I know this is not advised, I have no choice) using asynchronous http. I am using synchronous http now, but I feel it is best to change to asynchronous.

This is what my code looks like now using asynch:

[lua]function response(event)
if event.isError then
print(“network error”)
else
print("RESPONSE: "…event.response)
end
end

function chatPoll(event)
network.request( “http://url/?","POST”,response,{ body = “body” } )
end
chatTimer=timer.performWithDelay(10000, chatPoll,0 )–for updating msg board[/lua]

Problem is, it never executes the function response(). I seem to have had this problem before – a listener calling another listener – and found a way around it, but this time I am not sure how to do this another way.

can a listener not call another listener? Is there another way to do this?

-Amanda [import]uid: 29997 topic_id: 14105 reply_id: 314105[/import]

a listener can call another listener, and your code works on build 600. it prints “network error”. [import]uid: 46529 topic_id: 14105 reply_id: 51924[/import]

oh wow, i just realized what i did. i had already defined a variable called response…

I changed it, it works fine ,thanks

-amanda [import]uid: 29997 topic_id: 14105 reply_id: 51929[/import]

so this works on the simulator, but not on my android 3.0. I thought android had asynch support now??

-amanda [import]uid: 29997 topic_id: 14105 reply_id: 52005[/import]

never mind. I moved some things around. its working.

-amanda [import]uid: 29997 topic_id: 14105 reply_id: 52019[/import]