in our software have issues asynchronous execution of events. 1 function "break into" 1 kinds of weird results.
i'm dealing here user-input , timers fire events.
the issue rather executing code tied events 1 one, it's done @ first possible moment delphi gives window it: application.processmessages. gives problems in half of function gets done, function b "breaks in", gets done , after , last half of function gets done. can give "surprising" results.
are there ways deal this?
things tried:
--
- using "busy-flag", has ups , downs, has know of it.
- removing application.processmessages can. has pretty results. we're relying on 3rd party components found out fire application.processmessages.
next thinking of trying building kind of "command-queue" can receive events , fire them in fifo way.
apart rebuilding have ground up, there other/better ways tackle these issues?
the best way eliminate call application.processmessages
. of time there other ways application.processmessages
supposed do. you'll need take closer why need call, , find better solution. example, don't need application.processmessages
update ui. there other ways that.
if 3rd party component calling application.processmessages
contact vendor should replace call better suited function. if not option, can try using workarounds using component in thread (if possible). or create invisible modal window , execute methods of component inside showmodal function. @ least avoid user input messages. (the "invisible modal window" form borderstyle=bsnone
, size=1×1 , 100% transparency).
Comments
Post a Comment