udp callback messages when app in background

Anything beyond the basics in using the LiveCode language. Share your handlers, functions and magic here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
mario.miele
Posts: 6
Joined: Sat Dec 26, 2015 11:20 am

udp callback messages when app in background

Post by mario.miele » Sat Dec 26, 2015 11:34 am

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

FredBeck
Posts: 77
Joined: Fri Nov 01, 2013 3:07 pm
Contact:

Re: udp callback messages when app in background

Post by FredBeck » Mon Dec 28, 2015 10:11 am

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.

mario.miele
Posts: 6
Joined: Sat Dec 26, 2015 11:20 am

Re: udp callback messages when app in background

Post by mario.miele » Tue Jan 05, 2016 12:38 pm

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

bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4172
Joined: Sun Jan 07, 2007 9:12 pm

Re: udp callback messages when app in background

Post by bn » Tue Jan 05, 2016 12:45 pm

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

mario.miele
Posts: 6
Joined: Sat Dec 26, 2015 11:20 am

Re: udp callback messages when app in background

Post by mario.miele » Tue Jan 05, 2016 1:08 pm

Oh, thanks Bernd!

Post Reply