Real Software Forums

The forum for Real Studio and other Real Software products.
[ REAL Software Website | Board Index ]
It is currently Sat Dec 07, 2019 6:06 am
xojo

All times are UTC - 5 hours




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: GetFolderItem Confusion
PostPosted: Mon Jan 14, 2013 4:49 pm 
Offline

Joined: Sun Jan 28, 2007 2:38 pm
Posts: 231
I need to call a directory and take out a template file called "myTemplate.txt".

We manipulate the template using RS. To keep things simple we have created a Property of type FolderItem in the App class called "MyTemplatesDirectory"


We call
MyTemplatesDirectory= App.ExecutableFile.Parent

#If DebugBuild Then
// Debug path to the templates
#EndIf


All is nice until we try to call the template as follows:

dim TheTemplateToUse as FolderItem
TheTemplateToUse=GetFolderItem(App.MyTemplatesDirectory.child("myTemplate.txt"))


We get Parameters not compatible with this function.

What is the proper syntax?


Top
 Profile  
Reply with quote  
 Post subject: Re: GetFolderItem Confusion
PostPosted: Mon Jan 14, 2013 4:55 pm 
Offline

Joined: Sun Jan 28, 2007 2:38 pm
Posts: 231
Figured it out...



TheTemplateToUse=GetFolderItem(App.MyTemplatesDirectory.child("myTemplate.txt"))

should be

TheTemplateToUse=GetFolderItem(App.MyTemplatesDirectory.child("myTemplate.txt").absolutepath)


Top
 Profile  
Reply with quote  
 Post subject: Re: GetFolderItem Confusion
PostPosted: Mon Jan 14, 2013 4:57 pm 
Offline

Joined: Mon May 30, 2011 12:56 am
Posts: 702
Or simpler:

TheTemplateToUse=App.MyTemplatesDirectory.child("myTemplate.txt")


Top
 Profile  
Reply with quote  
 Post subject: Re: GetFolderItem Confusion
PostPosted: Fri Jan 18, 2013 12:17 pm 
Offline

Joined: Sun Jan 28, 2007 2:38 pm
Posts: 231
Thanks Kermit!


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:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group