gettingstarted
[Top] [All Lists]

Re: Help with accessing file

To: Getting Started <gettingstarted at lists dot realsoftware dot com>
Subject: Re: Help with accessing file
From: Brad Rhine <brad at truetech dot org>
Date: Wed, 30 Mar 2005 21:43:44 -0500
Delivered-to: gettingstarted at lists dot realsoftware dot com
References: <BAY2-F59E3979191AE093AA3EF3DA470 at phx dot gbl>
On Mar 30, 2005, at 9:33 PM, Lennox Jacob wrote:

FI = Volume(0).Child("Applications").Child("myAPP").Child("Txt1")

Hi, Lennox!

There are a couple issues here. First, you're not doing any error checking along the path. If any of these FolderItems is nil, everything falls apart.

Second, if "myAPP" is your application, it probably won't have any children. :) Only folders (and bundles) can do that. You probably want something more like this:
FI=GetFolderItem("Txt1")

That will find a FolderItem called "Txt1" in the same directory as the application itself.

You should probably still check the file for nil and make sure it exists as well.

Hope this helps! :)

--
brad at truetech dot org
http://truetech.org
<><

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

<Prev in Thread] Current Thread [Next in Thread>