Solved

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

Posted on 2015-02-22
3
332 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…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
Suggested Courses
Course of the Month11 days, 8 hours left to enroll

623 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