gettingstarted
[Top] [All Lists]

Re: Creating/Opening a New File??

To: Getting Started <gettingstarted at lists dot realsoftware dot com>
Subject: Re: Creating/Opening a New File??
From: Will Leshner <leshner at ljug dot com>
Date: Tue, 28 Sep 2004 22:13:46 -0700
Delivered-to: gettingstarted at lists dot realsoftware dot com
References: <00c001c4a5dd$bd337c80$6401a8c0 at travergateway>

On Sep 28, 2004, at 9:35 PM, B Traver wrote:

Help!  I know how to create files using a Save dialog box, but I can't
figure out how to create files without using a Save dialog Box. When I
try to define an AbsolutePath Property for a FolderItem, for example,
I'm told that I can't set that Property.


As you have figured out already, you need to get a FolderItem to the not-yet-created file. Say you wanted to create a file called foo.html on the desktop. Here's how you would get that FolderItem

dim f as FolderItem
f = DesktopFolder.Child("foo.html")

So, basically, you have to start from a known place and work your way to where you want the folder. In your situation, what I'd do is ask the user to choose the folder into which all of the files will be created using SelectFolder or SelectFolderDialog. Then you'll have a FolderItem that points to the parent folder and from there you can get FolderItems for all of the children using the Child method.

--
REALbasic database options: http://sqlabs.net
REALbasic news and tips: http://rbgazette.com
KidzMail & KidzLog: http://haranbanjo.com

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

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

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