Sign in Join

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

Mailing lists / lazarus / 2008-10

Carbon: PostMessage/SendMessage

3 messages · 2 people · –

Reply by email Subscribe to this list Your subscription

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

EarMaster - Bent Olsen

Hi all,

I've read about "New 0.9.26 features. Part 1. SendMessage and PostMessage", and we are using PostMessage from a thread in Lazarus v0.9.27 rev 16990+ on both Mac OS X i386 and PPC, and they all seem to work fine.

However, this might not be the case on some Mac OS X 10.4.11 installations (out of reach client installation), because some functions seem to not being processed which depend on messages.

Before we send out a test program, I like to hear if anyone have had a similar problems with threads and messages on different Mac OS X?

Best regards,
Bent Normann Olsen

Reply by email

EarMaster - Bent Olsen

Hi,

Just a follow up - I've compiled a small test program with a thread and PostMessage for the client installation, and it's working as it should, so nothing wrong with posting messages.

Back to testing...

Show quoted text 22 lines
-----Original Message----- From: EarMaster - Bent Olsen [mailto:] Sent: 24. oktober 2008 13:42 To: 'General mailing list' Subject: Carbon: PostMessage/SendMessage Hi all, I've read about "New 0.9.26 features. Part 1. SendMessage and PostMessage", and we are using PostMessage from a thread in Lazarus v0.9.27 rev 16990+ on both Mac OS X i386 and PPC, and they all seem to work fine. However, this might not be the case on some Mac OS X 10.4.11 installations (out of reach client installation), because some functions seem to not being processed which depend on messages. Before we send out a test program, I like to hear if anyone have had a similar problems with threads and messages on different Mac OS X? Best regards, Bent Normann Olsen

Reply by email

mitya boyarintsev
to EarMaster - Bent Olsen

beware! if you're going to use Carbon sendevent (sendmessage), than you should keep in mind, that it acts different from Windows thread message.

Win sendmessage blocks the sending thread until recieving threads proccess the messages. Of cause, if thread sends a message to itself (or a window in the same thread) then processing function is called immediatly.

Mac sendevent actually calls event process function, in the calling thread. This might cause any kind of threads errors, if data is not syncronized. -------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.lazarus.freepascal.org/pipermail/lazarus/attachments/20081027/95c7e82f/attachment.html

Reply by email