Real Software Forums

The forum for Real Studio and other Real Software products.
[ REAL Software Website | Board Index ]
It is currently Tue Nov 12, 2019 3:53 pm
xojo

All times are UTC - 5 hours




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: FolderItem.Launch and Nil FolderItem.Type
PostPosted: Thu Mar 01, 2012 5:53 am 
Offline

Joined: Fri Jul 21, 2006 12:28 am
Posts: 509
I'm having a problem in Windows 7 and Windows Vista when trying to use FolderItem.Launch on pdf files. The files don't launch and FolderItem.Type is Nil, which I assume is the reason the files don't launch. I don't have this problem with the same application in Windows XP or OS X. I would think that the OS would be able to identify the file type from the extension but that doesn't appear to be the case in Windows Vista and Windows 7. Any idea how to resolve this problem? Adobe Reader is installed in all cases and set as the default application for pdf files. Here is a code example:
Dim f As FolderItem
Dim bs As BinaryStream
f = SpecialFolder.Temporary.Child("help.pdf")
If f <> Nil then
If not f.Exists then
bs = bs.Create(f,False)
bs.Write helpfile
bs.Close
End if
If f.Exists then
f.Launch
If f.LastErrorCode <> 0 then
MsgBox "It failed."
End if
Else
MsgBox "No help."
End if
End if

_________________
Regards,
Carl
Capaho Web
http://www.capaho.com


Top
 Profile  
Reply with quote  
 Post subject: Re: FolderItem.Launch and Nil FolderItem.Type
PostPosted: Thu Mar 01, 2012 7:43 pm 
Offline

Joined: Sat Oct 01, 2005 5:19 pm
Posts: 3216
So what happens when you go and double click on the file? Is it even there?


Top
 Profile  
Reply with quote  
 Post subject: Re: FolderItem.Launch and Nil FolderItem.Type
PostPosted: Thu Mar 01, 2012 8:04 pm 
Offline
Real Software Engineer

Joined: Sat Dec 24, 2005 8:18 pm
Posts: 7858
Location: Canada, Alberta, Near Red Deer
The fun part is that IF you install some other reader other than Adobe Reader & make it the default to open PDF's it probably will launch that other reader

We've seen this reported before but honestly don't have a solution as this seems to ONLY affect Acrobat Reader on Windows

It's VERY peculiar

_________________
Norman Palardy (Real Software)


Top
 Profile  
Reply with quote  
 Post subject: Re: FolderItem.Launch and Nil FolderItem.Type
PostPosted: Thu Mar 01, 2012 8:22 pm 
Offline

Joined: Fri Jul 21, 2006 12:28 am
Posts: 509
Jym wrote:
So what happens when you go and double click on the file? Is it even there?

If I double-click directly on the file it opens, it's only through the app using FolderItem.Launch that it doesn't open and FolderItem.Type is Nil.

_________________
Regards,
Carl
Capaho Web
http://www.capaho.com


Top
 Profile  
Reply with quote  
 Post subject: Re: FolderItem.Launch and Nil FolderItem.Type
PostPosted: Thu Mar 01, 2012 8:24 pm 
Offline

Joined: Fri Jul 21, 2006 12:28 am
Posts: 509
npalardy wrote:
The fun part is that IF you install some other reader other than Adobe Reader & make it the default to open PDF's it probably will launch that other reader

We've seen this reported before but honestly don't have a solution as this seems to ONLY affect Acrobat Reader on Windows

It's VERY peculiar

I wonder if Adobe has done something with Acrobat Reader to deal with the myriad security issues it has had over the years that may be causing the problem. I'll try a different PDF reader and see what happens.

_________________
Regards,
Carl
Capaho Web
http://www.capaho.com


Top
 Profile  
Reply with quote  
 Post subject: Re: FolderItem.Launch and Nil FolderItem.Type
PostPosted: Thu Mar 01, 2012 8:44 pm 
Offline

Joined: Sat Oct 01, 2005 5:19 pm
Posts: 3216
I just tried it and got it to launch but I have Pro installed not the reader.

Wanna bet it's a registry thing? You should be able to find the .exe from registry, and go about it that way


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 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:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group