Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2009-11

Carbon event loop question

2 messages · 1 person ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Brad Campbell

G'day all,

My application does some heavy lifting under the splash screen. Periodically (every 500ms) the processor updates a label.caption on the splash screen and calls Application.processmessages.

On GTK2 / Win32 / Carbon on OSX 10.4 this works perfectly. On 10.5 & 10.6 it queues the updates, and then when the application finally goes idle the splash screen very rapidly runs through all the updates before disappearing.

If I put a significant delay after the Application.processmessages call, the problem goes away, but I'm talking ~2-300 ms, and the required delay is processor speed dependent. The faster the processor, the longer the delay required to get the OS to actually do the draw.

On 10.6, the splash screen won't even complete drawing unless I insert a couple of hundred milliseconds pause after the Application.Processmessages after I show() it.

Is there something obvious I'm missing, or do I need to knock up a test app to demonstrate it?

Regards,
Brad

Dolphins are so intelligent that within a few weeks they can train Americans to stand at the edge of the pool and throw them fish.

Reply by email

Brad Campbell
to Brad Campbell
Brad Campbell wrote 5 lines
G'day all, My application does some heavy lifting under the splash screen. Periodically (every 500ms) the processor updates a label.caption on the splash screen and calls Application.processmessages.

Hold that question. I can now no longer reproduce this behaviour... <grumble>

Dolphins are so intelligent that within a few weeks they can train Americans to stand at the edge of the pool and throw them fish.

Reply by email