hi,
have just noticed an 'interesting' behaviour with TApplicationProperties.OnIdle events - see attached example project [REMOVED - SEE UPDATED ATTACHMENT IN Reply #5]
in an application i'm working on, within a Timer event i am generating quite a bit of work which is (under certain extreme conditions) 'swamping' the LCL and causing the application's GUI to become non-responsive. the solution i've found for this is to have an OnIdle event handler set a timestamp every time it is called. if my Timer event handler sees this timestamp fall more than 100ms behind, it starts skipping (ie, if idle timestamp is >100ms old, then exit). this, on the whole, works quite well and keeps the rest of the application responsive.
the problem is, if a dialog itself creates a popup question - for example, TSaveDialog pops up a box asking about overwriting a file - then the OnIdle event handler stops being called until the popup question is closed. the attached example project demonstrates this. Label1 indicates OnIdle activity. click on Button1 to bring up SaveDIalog1, select a file that already exists, and when you click 'Save' a popup question is generated asking "A file named xxxx.xxx" already exists. Do you want to replace it?". at this point, the counter displayed in Label1 freezes (indicating OnIdle is no longer being called), and stays frozen until the popup question box closes.
is this a bug with OnIdle? with the TSaveDialog? i would have thought that OnIdle should continue being called throughout the whole time the TSaveDialog is open, even if focus is diverted to a popup question.
cheers,
rob :-)