EventLoop not allways executed on Windows and MacOS

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
Niffo
Enthusiast
Enthusiast
Posts: 504
Joined: Tue Jan 31, 2006 9:43 am
Location: France

EventLoop not allways executed on Windows and MacOS

Post by Niffo »

Unlike on Linux, Purebasic does not enter in his EventLoop on Windows and MacOS when a Window is moved or simply when a menu is opened (!). So any form of timing operation is impossible and even the new "WindowTimers" of PB4.40 does not trigger in these cases.
Any chance of a change of that ?
Last edited by Niffo on Thu Oct 22, 2009 4:57 pm, edited 1 time in total.
Niffo
rsts
Addict
Addict
Posts: 2736
Joined: Wed Aug 24, 2005 8:39 am
Location: Southwest OH - USA

Re: EventLoop not allways executed

Post by rsts »

From my own experience, it's preferable the way it is, unless the move behavior was some sort of option.

cheers
User avatar
Kaeru Gaman
Addict
Addict
Posts: 4826
Joined: Sun Mar 19, 2006 1:57 pm
Location: Germany

Re: EventLoop not allways executed on Windows and MacOS

Post by Kaeru Gaman »

I don't know what is the reason for it, but it "always" has been this way.
a WindowedScreen freezes when you move the Window or open the Menu.
the only thing you can do is to handle your timing in a way that pays attention to this behaviour.

it really would be interesting to know what the reason is,
and it would be nice if that behaviour could be changed.


@rsts
it's preferable the way it is
ermn... nope?
unless the move behavior was some sort of option
hu? don't understand what you mean?
oh... and have a nice day.
Offin
User
User
Posts: 34
Joined: Mon May 04, 2009 10:53 am
Location: France

Re: EventLoop not allways executed on Windows and MacOS

Post by Offin »

My application must send continuously an udp streaming, and i would like to use the PopupMenu item.
Right now, i have no choice to forget the PopupMenu and to find a workaround.
Just to tell you that PopupMenu which keeps EventLoop access would be great also for me.
c4s
Addict
Addict
Posts: 1981
Joined: Thu Nov 01, 2007 5:37 pm
Location: Germany

Re: EventLoop not allways executed on Windows and MacOS

Post by c4s »

You mean the eventloop is blocked while the window is moved or an popup window is opened? That is as Kaeru Gaman already said completely normal.
You should use a thread to send you udp stuff because it's working simultaneously to the eventloop so it won't be blocked.
If any of you native English speakers have any suggestions for the above text, please let me know (via PM). Thanks!
Niffo
Enthusiast
Enthusiast
Posts: 504
Joined: Tue Jan 31, 2006 9:43 am
Location: France

Re: EventLoop not allways executed on Windows and MacOS

Post by Niffo »

Threads should be the solution, but its use in PB seems to be very "delicate" and causes many "IMA" (particularly on MacOS ? ...)
Niffo
User avatar
Kaeru Gaman
Addict
Addict
Posts: 4826
Joined: Sun Mar 19, 2006 1:57 pm
Location: Germany

Re: EventLoop not allways executed on Windows and MacOS

Post by Kaeru Gaman »

not the use of threads causes the IMA, but the incorrect coding concerning Stack, Heaps shared Variables, Strings, etc.
threads are safe if you halfways know what you do.
oh... and have a nice day.
User avatar
HeX0R
Addict
Addict
Posts: 1189
Joined: Mon Sep 20, 2004 7:12 am
Location: Hell

Re: EventLoop not allways executed on Windows and MacOS

Post by HeX0R »

See -here-, i also think this is a bad behaviour of PB.
If the events just freezing, this wouldn't be that bad (well bad enough though), but they've got lost...
Post Reply