New topic: Path to project files
<http://forums.realsoftware.com/viewtopic.php?t=46158> Page 1 of 1 [ 7 posts ] Previous topic | Next topic Author Message neonash7777 Post subject: Path to project filesPosted: Thu Dec 06, 2012 2:05 pm Joined: Mon Nov 29, 2010 7:01 pm Posts: 321 I add most my media and files into an app by dragging and dropping them in. But what is the path to these files once the program is compiled and running on another computer? Is there a way to access these resources with folderitems (even if I can't edit them)? For example lets say I have an images folder in my project and I want to traverse through all the image files. I this possible? Top charonn0 Post subject: Re: Path to project filesPosted: Thu Dec 06, 2012 2:23 pm Joined: Mon Apr 02, 2007 2:08 am Posts: 1028 Location: San Francisco, CA, USA A file dragged into the project is embedded directly into the executable as a string variable. The only way to get a FolderItem would be to write the string to a temporary file. _________________ Boredom Software Top neonash7777 Post subject: Re: Path to project filesPosted: Thu Dec 06, 2012 3:08 pm Joined: Mon Nov 29, 2010 7:01 pm Posts: 321 charonn0 wrote:A file dragged into the project is embedded directly into the executable as a string variable. The only way to get a FolderItem would be to write the string to a temporary file. That's unfortunate. I was primarily hoping for a way for connecting to MySQL using SSL db.ConnectSSL(clientkey,clientcert, auth, authpath,cipherString) But I can't give an authPath because it doesn't exist... Secondarily I wanted to be able to grab imagefiles variably from the images folder in the project. It saddens me that there's no way to cycle through these resources. ------EDIT Is there a way to save an internal resource as folderitem? Top charonn0 Post subject: Re: Path to project filesPosted: Thu Dec 06, 2012 4:02 pm Joined: Mon Apr 02, 2007 2:08 am Posts: 1028 Location: San Francisco, CA, USA neonash7777 wrote:Is there a way to save an internal resource as folderitem? I suppose you could distribute the resources as a VirtualVolume, though you would still need to write the embedded string (the virtual volume file) to a temporary file before accessing it. _________________ Boredom Software Top timhare Post subject: Re: Path to project filesPosted: Thu Dec 06, 2012 4:20 pm Joined: Fri Jan 06, 2006 3:21 pm Posts: 11865 Location: Portland, OR USA Use an installer and include the resource files separately (don't drop them on the project). Top charonn0 Post subject: Re: Path to project filesPosted: Thu Dec 06, 2012 4:20 pm Joined: Mon Apr 02, 2007 2:08 am Posts: 1028 Location: San Francisco, CA, USA timhare wrote:Use an installer and include the resource files separately (don't drop them on the project). Probably saner and easier than my idea _________________ Boredom Software Top nelson2012 Post subject: Re: Path to project filesPosted: Thu Dec 06, 2012 5:48 pm Joined: Mon Dec 03, 2012 8:50 pm Posts: 5 I found your difficulty description puzzling. You drop the files into your project--do you mean into the source code or into the compiled app? If into the source code, then you can solve the problem by always using the same relative path. For example, if the db is stored in a subfolder of the one that holds the app, then it is just a child of the app's parent. Also, look at the SpecialFolder keyword. You might be using a folder that is a child of one of the special folders such as a Library folder. If this is the case, RealStudio will find most of the path for you. Top Display posts from previous: All posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost timeSubject AscendingDescending Page 1 of 1 [ 7 posts ] -- Over 1500 classes with 29000 functions in one REALbasic plug-in collection. The Monkeybread Software Realbasic Plugin v9.3. http://www.monkeybreadsoftware.de/realbasic/plugins.shtml [email protected]
