Solved

Hook into main loop in Firemonkey somehow to process data from another thread.

Posted on 2015-02-22
3
314 Views
Last Modified: 2015-05-30
I wonder if there is a way to hook onto an applications main loop in Firemonkey to be able to process a custom made queue from a different thread. In other words, in the Win32 world I would be able to create a hook to the message handling routine, and check for my own custom windows messages and do something. In Firemonkey and crossplatform this isn't possible and I wonder how to do something equal.

I am currently thinking about working through the data from my other threads queue in an TIdleMessage event.
  FIdleHandlerID := TMessageManager.DefaultManager.SubscribeToMessage(TIdleMessage,EventMessageListener);
But I dont know if thats a good way.

How does other developers write code that needs to regulary check results from another thread without having to manually add calls in the main threads code that checks the queue in Delphi Firemonkey?
0
Comment
Question by:Probie
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 27

Accepted Solution

by:
Sinisa Vuk earned 500 total points
ID: 40631994
I would use thread with custom procedure.  As an event - start thread with synced procedure where you do some stuff. (similar to: synchronize-and-queue-with-parameters/)
Another solution is very well described here:
http://francois-piette.blogspot.dk/2013/12/firemonkey-android-windows-and.html
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question