Page 1 of 1

udp callback messages when app in background

Posted: Sat Dec 26, 2015 11:34 am
by mario.miele
From some LC version on (7?) the callback handler specified in an instruction like:

Code: Select all

accept datagram connections on port xxx with message callbackMessage
is only called when the application is the frontmost window or if you move the mouse on its window (at least on MacOs X).

Is there a solution to this without using workaround as putting a handler sending temporized messages to itself?
Am I missing something or it is a bug?

Thanks in advance

Re: udp callback messages when app in background

Posted: Mon Dec 28, 2015 10:11 am
by FredBeck
Hi Mario, welcome!
I'm no expert but since you didn't get any reply...
I don't think what you describe is the normal behavior. It doesn't happen on Windows in any case!
Does this happen in the IDE as well?
My guess is that you have something in your code that either closes the socket or locks the screen when the app is not in focus.
Seeing it's your first post I assume you're a beginner? Do you know how to debug?
Fred.

Re: udp callback messages when app in background

Posted: Tue Jan 05, 2016 12:38 pm
by mario.miele
Hi Fred,

no, nothing to do with socket closes or screen locks (anyway, the screen lock should only freeze the screen refresh, not the other activities under the hood). If you move the cursor over the program window, without clicking and focusing it, the program suddenly starts to receive messages, and stops if you move it out: it is as there was a lack of generation of internal periodical refresh events.
And, in any case, if you create the app using version 6.x of LC, the problem disappears.

And no, I'm not a beginner, I just forgot my former user name and I had to register myself again :-)

Anyway, thanks for your interest.
Mario

Re: udp callback messages when app in background

Posted: Tue Jan 05, 2016 12:45 pm
by bn
Hi Mario,

no idea about udp, but your former user name was mmiele

http://forums.livecode.com/memberlist.p ... ile&u=1601

Kind regards
Bernd

Re: udp callback messages when app in background

Posted: Tue Jan 05, 2016 1:08 pm
by mario.miele
Oh, thanks Bernd!