Real Software Forums

The forum for Real Studio and other Real Software products.
[ REAL Software Website | Board Index ]
It is currently Tue Aug 20, 2019 9:36 am
xojo

All times are UTC - 5 hours




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: IsFileOpen... realbasic equivalent
PostPosted: Wed Jul 13, 2011 12:45 am 
Offline

Joined: Fri May 07, 2010 9:40 pm
Posts: 37
I'm trying to find a function to check whether or not a file (external pdf) has finished loading. in VB isFileOpen(did the trick), however references to IsWritable, FileInUse error are not helping.

Why you ask.

I have a file created on the fly (xfdf) with the validated parameters to open the related PDF file, for security reasons once this file (PDF) is open, you can manually delete the xfdf file, however I want to automatically delete it. I can only get it to work by adding a question to delete file (hence letting the external PDF finally load), then it works ok. I dont want to put a specific doEvents delay as the size of the end file will be 100 bigger than my test file, plus peoples PCs/MAC are all different speeds.

Any IfFileOpen or finishedLoading for an external PDF suggestions?


Top
 Profile  
Reply with quote  
 Post subject: Re: IsFileOpen... realbasic equivalent
PostPosted: Wed Jul 13, 2011 2:37 am 
Offline

Joined: Mon Jul 24, 2006 4:06 am
Posts: 274
Isn't the loading of a file done synchronously? So if you open a file then the next line afterwards shows you that the file has loaded.

HTH

Trixi

_________________
Mit freundlichen Grüßen/Regards

Trixi Willius

http://www.mothsoftware.com
Mail Archiver X: The email archiving solution for professionals


Top
 Profile  
Reply with quote  
 Post subject: Re: IsFileOpen... realbasic equivalent
PostPosted: Wed Jul 13, 2011 7:40 pm 
Offline

Joined: Fri May 07, 2010 9:40 pm
Posts: 37
Internally yes, but when you run f.launch control is given to the app running the file, not your app. This is where my problem lies.


Top
 Profile  
Reply with quote  
 Post subject: Re: IsFileOpen... realbasic equivalent
PostPosted: Thu Jul 14, 2011 1:04 am 
Offline

Joined: Fri Jan 06, 2006 3:21 pm
Posts: 12388
Location: Portland, OR USA
Run a loop that repeatedly tries to delete the file every X milliseconds. Once the delete succeeds, you know it's finished.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC - 5 hours


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group