Page 1 of 1

TFindFile - REQUEST

PostPosted: May 24th, 2011, 12:22 pm
by Okann
Dear delphi area,

I need a pause and continue function for TFindFile component

I would be glad if you help..

Regards,,

Use a sync object to pause/resume TFindFile

PostPosted: May 24th, 2011, 9:39 pm
by Kambiz
First of all, you should use TFindFile in threaded mode, so that you can pause or resume its thread.

An easy but unsafe solution is pausing/resuming the thread object. The change of deadlock is high, and besides that Pause and Resume methods of TThread class are deprecated now.

A better solution is using a synchronization object to put the thread in the wait state whenever is needed. Usually, the pause is needed when the user should do some actions regarding the last found item. So, it's better we save time and keep searching while the user is making a decision. We only have to really pause the search when another item is found.

You will find a sample implementation of the above in the attached file.

Re: TFindFile - REQUEST

PostPosted: May 24th, 2011, 11:11 pm
by Okann
Thank you very much for your interest...

Regards,

Re: TFindFile - REQUEST

PostPosted: September 9th, 2011, 11:34 pm
by Okann
hello,

Do you compile this component for Delphi XE and XE2?

regards...

Re: TFindFile - REQUEST

PostPosted: September 10th, 2011, 2:27 pm
by Kambiz
I don't think so. For the moment, I am not going to spend more time on Delphi.

Re: TFindFile - REQUEST

PostPosted: September 10th, 2011, 2:55 pm
by Okann
DELPHIAREA.INC

is sufficient to add the following code?

.
.
.

{$DEFINE COMPILER2012_UP}
{$DEFINE COMPILER2011_UP}
{$DEFINE COMPILER2010_UP}
{$DEFINE COMPILER2009_UP}
{$DEFINE COMPILER2007_UP}
{$DEFINE COMPILER2006_UP}
{$DEFINE COMPILER2005_UP}
{$DEFINE COMPILER7_UP}
{$DEFINE COMPILER6_UP}
{$DEFINE COMPILER5_UP}
{$DEFINE COMPILER4_UP}
{$DEFINE COMPILER3_UP}
{$DEFINE COMPILER2_UP}

{ Then detect if it is older (.NET versions are ignored) }


{$IFDEF VER230} // Delphi XE2

{$ENDIF}

{$IFDEF VER220} // Delphi XE

{$ENDIF}

{$IFDEF VER210} // Delphi 2010

{$ENDIF}

.
.
.

Re: TFindFile - REQUEST

PostPosted: September 10th, 2011, 3:16 pm
by Kambiz
Okann,

The inc file does not need to be modified because it is only needed for Delphi 2007 and earlier.

Re: TFindFile - REQUEST

PostPosted: September 10th, 2011, 3:48 pm
by Okann
thank you dear Kambiz

Re: TFindFile - REQUEST

PostPosted: January 2nd, 2014, 12:06 pm
by Okann
Dear Kambiz,

FindFile_PauseResume.zip corrupted archives


please reupload


Regards...

Re: TFindFile - REQUEST

PostPosted: January 12th, 2014, 8:50 pm
by Kambiz
I'm really sorry but my backup files are corrupted too. :(