DIR.Copy (Source, Dest) Freeze Problem

Questions regarding syntax

DIR.Copy (Source, Dest) Freeze Problem

Postby DevConcepts » Sun Sep 19, 2010 11:29 pm

Running the DIR.Copy (Source, Dest) process runs correctly however, it makes the program (GUI) unresponsive until copying is complete.

I have tried DoEvents(), Application.DoEvents(), Do While, and nothing will give control back to the GUI.

Any Ideas? Thanks in advance.
DevConcepts
 
Posts: 10
Joined: Sat Feb 21, 2009 5:17 pm

Re: DIR.Copy (Source, Dest) Freeze Problem

Postby berndnoetscher » Mon Sep 20, 2010 7:20 am

DevConcepts wrote:Running the DIR.Copy (Source, Dest) process runs correctly however, it makes the program (GUI) unresponsive until copying is complete.

I have tried DoEvents(), Application.DoEvents(), Do While, and nothing will give control back to the GUI.

Any Ideas? Thanks in advance.


Thanks for the information.
Checked out the C++ code of this function, and added a doevents to the copy function. So in the next version, it will be responsive.
berndnoetscher
Site Admin
 
Posts: 1059
Joined: Tue Sep 25, 2007 9:37 am

Re: DIR.Copy (Source, Dest) Freeze Problem

Postby DevConcepts » Mon Sep 20, 2010 5:13 pm

berndnoetscher wrote:Thanks for the information.
Checked out the C++ code of this function, and added a doevents to the copy function. So in the next version, it will be responsive.


Thanks! Any approximate release date for next version?

Also would the Q7 version have the same issue?
DevConcepts
 
Posts: 10
Joined: Sat Feb 21, 2009 5:17 pm

Re: DIR.Copy (Source, Dest) Freeze Problem

Postby berndnoetscher » Tue Sep 21, 2010 10:15 am

DevConcepts wrote:
berndnoetscher wrote:Thanks for the information.
Checked out the C++ code of this function, and added a doevents to the copy function. So in the next version, it will be responsive.


Thanks! Any approximate release date for next version?

Also would the Q7 version have the same issue?


Thanks
KBasic next version is planned around by 30-September.
Q7B has already doevents in such functions.
berndnoetscher
Site Admin
 
Posts: 1059
Joined: Tue Sep 25, 2007 9:37 am

Re: Update - DIR.Copy (Source, Dest) Freeze Problem

Postby DevConcepts » Sat Oct 09, 2010 6:50 pm

Grabbed the latest win version (v) and ran the code and the results are in.

To let the user know that the program is functioning, I added a progress bar with a timer running 0 to 100 reset to 0.

Works correctly (No freeze) while copying directories and small files, progress bar moves about the same speed.

Still freezes with large files ( 10-15 mb or larger can be noticed) being copied, the progress bar freezes then continues with the next file.

Still a better improvement, Thanks.

When will the linux version be available?
DevConcepts
 
Posts: 10
Joined: Sat Feb 21, 2009 5:17 pm

Re: Update - DIR.Copy (Source, Dest) Freeze Problem

Postby berndnoetscher » Mon Oct 11, 2010 8:40 am

DevConcepts wrote:Grabbed the latest win version (v) and ran the code and the results are in.

To let the user know that the program is functioning, I added a progress bar with a timer running 0 to 100 reset to 0.

Works correctly (No freeze) while copying directories and small files, progress bar moves about the same speed.

Still freezes with large files ( 10-15 mb or larger can be noticed) being copied, the progress bar freezes then continues with the next file.

Still a better improvement, Thanks.

When will the linux version be available?



Add a timer to your app, which calls DoEvents().
berndnoetscher
Site Admin
 
Posts: 1059
Joined: Tue Sep 25, 2007 9:37 am

Re: DIR.Copy (Source, Dest) Freeze Problem

Postby Slowdown » Mon Oct 11, 2010 7:45 pm

@Bernd,
Add a timer to your app, which calls DoEvents().

Won't work Bernd, have tried The form timer properties and the timer control.
Regards
Slowdown for now i'm back
Slowdown
 
Posts: 347
Joined: Sat May 02, 2009 6:48 pm
Location: Netherlands

Re: DIR.Copy (Source, Dest) Freeze Problem

Postby berndnoetscher » Tue Oct 12, 2010 7:29 am

Slowdown wrote:@Bernd,
Add a timer to your app, which calls DoEvents().

Won't work Bernd, have tried The form timer properties and the timer control.


Well, looks like in this case a different thread would be needed, which is out of scope of KBasic causing much trouble to implement it. Sorry.
Running a small batch file to copy directories could fix it. Would be different processes...

<<When will the linux version be available?

The next weeks, after I upload Q7Basic for Linux.
berndnoetscher
Site Admin
 
Posts: 1059
Joined: Tue Sep 25, 2007 9:37 am

Re: DIR.Copy (Source, Dest) Freeze Problem

Postby Slowdown » Tue Oct 12, 2010 7:02 pm

Hi Bernd,

I'm working at a workaround, not with the File.Copy command and it's probably not the thing
DevConcepts is hoping/looking for but it works.
The base i have written is in the example 'FileCopy'.
If it's working at the way i want it to i'll upload it.
Regards
Slowdown for now i'm back
Slowdown
 
Posts: 347
Joined: Sat May 02, 2009 6:48 pm
Location: Netherlands

Re: DIR.Copy (Source, Dest) Freeze Problem

Postby Slowdown » Wed Oct 13, 2010 6:39 pm

Have made a promisse.
File copy function with some extra's.

Copy_It.zip
(2.18 KiB) Downloaded 113 times
Regards
Slowdown for now i'm back
Slowdown
 
Posts: 347
Joined: Sat May 02, 2009 6:48 pm
Location: Netherlands


Return to Coding Questions

cron