applicationSupportFolder (REALbasic network user group Mailinglist archive)

Back to the thread list
Previous thread: MessageDialog retains values between calls to ShowModal?
Next thread: TextArea Scrollbar


Re: Audience / Separation of users?   -   Rubber Chicken Software Co.
  applicationSupportFolder   -   ER
   Re: applicationSupportFolder   -   ER
   Re: applicationSupportFolder   -   fargo rpgportland.com
   Re: applicationSupportFolder   -   Norman Palardy
   Re: applicationSupportFolder   -   Someone
   Re: applicationSupportFolder   -   ER
   Re: applicationSupportFolder   -   ER
   Re: applicationSupportFolder   -   ER
   Re: applicationSupportFolder   -   ER
   Re: applicationSupportFolder   -   Norman Palardy
    Re: applicationSupportFolder   -   Lennox Jacob
     Re: applicationSupportFolder   -   ER
     Re: applicationSupportFolder   -   Harrie Westphal
   Re: applicationSupportFolder   -   Someone
   Re: applicationSupportFolder   -   Christian Dorn
   Re: applicationSupportFolder   -   Norman Palardy
   Re: applicationSupportFolder   -   Norman Palardy
   Re: applicationSupportFolder   -   ER
   Re: applicationSupportFolder   -   ER
   Re: applicationSupportFolder   -   Someone
   Re: applicationSupportFolder   -   Charles Yeomans
   Re: applicationSupportFolder   -   Christian Dorn
   Re: applicationSupportFolder   -   ER
   Re: applicationSupportFolder   -   ER
   Re: applicationSupportFolder   -   Someone
   Re: applicationSupportFolder   -   ER
   Re: applicationSupportFolder   -   ER
   Re: applicationSupportFolder   -   Harrie Westphal
   Re: applicationSupportFolder   -   Someone
   Re: applicationSupportFolder   -   Charles Yeomans
   2-bit apps, 32-bit libraries, 64-bit OS   -   Rubber Chicken Software Co.

applicationSupportFolder
Date: 01.03.10 20:25 (Mon, 1 Mar 2010 13:25:11 -0600)
From: ER
Hi -

I'm trying to save a file to a folder in the
applicationSupportFolder but I'm running
into a problem that it doesn't exist.

Ok so I point to it
f pplicationSupportFolder.child("PS")

then see if one exists or nil. If no folder, then create one
f.createAsFolder

Then I check again for nil or exists and it comes up exists is false.

Is there something special you need to do with
applicationSupportFolder ?

I gotten my app to work with Document folder but the app one is being
a problem.

I looked in the applicationSupportFolder and no folder has been
created.

Thanks

Eric

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

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Re: applicationSupportFolder
Date: 02.03.10 03:46 (Mon, 1 Mar 2010 20:46:04 -0600)
From: ER

>>>
>>> In a previous post he said 5.5 (not 2009r5 etc but 5.5 from about
>>> 2004/2005 ish)
>>>
>> Yeah nothing like using a spoon when you need a bulldozer . LOL
>
> Or a machete when you need a scalpel ?

LOL.. that too ! ;-)

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

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Re: applicationSupportFolder
Date: 02.03.10 03:36 (Mon, 1 Mar 2010 18:36:59 -0800)
From: fargo rpgportland.com
>
> On 1-Mar-10, at 5:37 PM, ER wrote:
>
>>
>>>
>>>
>>> In a previous post he said 5.5 (not 2009r5 etc but 5.5 from about
>>> 2004/2005 ish)
>>>
>> Yeah nothing like using a spoon when you need a bulldozer . LOL
>
> Or a machete when you need a scalpel ?
>

My favorite line along those lines is "Never howitzer a housefly".

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

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Re: applicationSupportFolder
Date: 02.03.10 03:28 (Mon, 1 Mar 2010 19:28:44 -0700)
From: Norman Palardy

On 1-Mar-10, at 5:37 PM, ER wrote:

>
>>
>> In a previous post he said 5.5 (not 2009r5 etc but 5.5 from about
>> 2004/2005 ish)
>>
> Yeah nothing like using a spoon when you need a bulldozer . LOL

Or a machete when you need a scalpel ?

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

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Re: applicationSupportFolder
Date: 02.03.10 02:02 (Tue, 02 Mar 2010 02:02:33 +0100)
From: Someone
> Some may complain that this code will fail as soon as Apple changes
> the folder structure of Mac OS X, but IIRC it has been the same
> since Mac OS X 10.0 (at least concerning the Preferences and the
> Application Support folder).

Well, anything can change by Apple. For instance, if someone relies
on a shell command and Apple remove it, then he will need to make a
new version of his application.

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

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Re: applicationSupportFolder
Date: 02.03.10 01:37 (Mon, 1 Mar 2010 18:37:56 -0600)
From: ER

>
> In a previous post he said 5.5 (not 2009r5 etc but 5.5 from about
> 2004/2005 ish)
>

Yeah nothing like using a spoon when you need a bulldozer . LOL

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

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Re: applicationSupportFolder
Date: 02.03.10 01:37 (Mon, 1 Mar 2010 18:37:16 -0600)
From: ER

>
> Well, the "users" one isn't more important than the "root" one, you
> know…
> _______________________________________________

Well as far as the importances goes.. not something I'm real
knowledgeable about.

I just presume, more or less, root is off limits and the "user" place
is where it should go.
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Re: applicationSupportFolder
Date: 02.03.10 01:34 (Mon, 1 Mar 2010 18:34:15 -0600)
From: ER

>
> Some may complain that this code will fail as soon as Apple changes
> the folder structure of Mac OS X, but IIRC it has been the same
> since Mac OS X 10.0 (at least concerning the Preferences and the
> Application Support folder).
>
> Gruß
> Christian
>

Ahh well I don't for seeing it change anytime soon, but even if it
does, just have to change my code, well until I
can upgrade! ;-)
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Re: applicationSupportFolder
Date: 02.03.10 01:25 (Mon, 1 Mar 2010 18:25:04 -0600)
From: ER

> http://support.apple.com/kb/HT2237?viewlocaleà_US
> -5000 accessDenied Incorrect access for this file/folder
>
> and in 5.5 ApplicationSupport is the one in The currently active
> system folder (I don't know if that is /System/Library/
> ApplicationSupport or /Library/ApplicationSupport on OS X)
> which is probably not the one you want and that you cant just write
> to willy nilly.
>
> What you really probably want is
> PreferencesFolder.Parent.Child("Application Support").Child( .... my
> app ...... ).child( .. file .....)
> which should be in the Users home folder > Library > Application
> Support > my app > y data file
> (or something like that)
>
> This is one of those things that's been fixed over the years to make
> it much easier on you
>

Ah I see.

I guess other options could the Documents folder, or Pref's folder.
and not worry about the Application Support
folder.

Yeah I just need to upgrade.. which will be soon.(if all goes well)

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

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Re: applicationSupportFolder
Date: 02.03.10 00:01 (Mon, 1 Mar 2010 16:01:32 -0700)
From: Norman Palardy

On 1-Mar-10, at 3:23 PM, Christian Dorn wrote:

> I don't know which version you're using,

In a previous post he said 5.5 (not 2009r5 etc but 5.5 from about
2004/2005 ish)

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

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Re: applicationSupportFolder
Date: 02.03.10 00:33 (Mon, 1 Mar 2010 15:33:23 -0800 (PST))
From: Lennox Jacob
2010R1
  Dim f as FolderItem

  f =  SpecialFolder.ApplicationData

  if f = nil then

    MsgBox "Nil folderitem for Application Support"

    return  // or whatever is appropriate where your code resides, same for all the other returns here

  end if

Lennox
--- On Mon, 3/1/10, Norman Palardy <<email address removed>> wrote:

From: Norman Palardy <<email address removed>>
Subject: Re: applicationSupportFolder
To: "REALbasic NUG" <<email address removed>>
Date: Monday, March 1, 2010, 3:01 PM

On 1-Mar-10, at 3:23 PM, Christian Dorn wrote:

> I don't know which version you're using,

In a previous post he said 5.5 (not 2009r5 etc but 5.5 from about 2004/2005 ish)

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

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>



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

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Re: applicationSupportFolder
Date: 02.03.10 01:39 (Mon, 1 Mar 2010 18:39:26 -0600)
From: ER

> You are correct for 2010R1; however, the original poster had,
> earlier in the same day, posted a similar problem and in that post
> stated he was using RB 5.5 and the folderitem statements he showed
> confirmed that fact. Then he made this new post and at the beginning
> of it he stated that he had the earlier problem working. Therefore I
> assumed that he was still referring to RB 5.5 and wrote the
> folderitem statement accordingly.
>

Mesa bad.. I'll have a new Rb soon. I hope ;-)
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Re: applicationSupportFolder
Date: 02.03.10 00:45 (Mon, 1 Mar 2010 17:45:43 -0600)
From: Harrie Westphal

On Mar 1, 2010, at 5:33 PM, Lennox Jacob wrote:

> 2010R1
> Dim f as FolderItem
>
> f ESpecialFolder.ApplicationData

You are correct for 2010R1; however, the original poster had, earlier in the same day, posted a similar problem and in that post stated he was using RB 5.5 and the folderitem statements he showed confirmed that fact. Then he made this new post and at the beginning of it he stated that he had the earlier problem working. Therefore I assumed that he was still referring to RB 5.5 and wrote the folderitem statement accordingly.

t A Mac addict in Tennessee u

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

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Re: applicationSupportFolder
Date: 01.03.10 23:24 (Mon, 01 Mar 2010 23:24:10 +0100)
From: Someone
Le 1 mars 10 à 23:03, ER a écrit:

>>> It gives me -5000
>>
>> -5000 is indeed a permission problem.
>>
>> Are you sure you're pointing in the same folder (in your app and
>> in the test you made in the Finder) and the app is running as the
>> same user as you (same as the Finder)? Check the absolute path of
>> your folderitem to be sure.
>
> Looks like f = applicationSupportFolder doesn't point to where I
> though it did. Appears it points to the root/admin (whatever)
> not the users, which seems kind of odd to me. I would think it
> would point to the users.

Well, the "users" one isn't more important than the "root" one, you
know…
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Re: applicationSupportFolder
Date: 01.03.10 23:23 (Mon, 1 Mar 2010 23:23:50 +0100)
From: Christian Dorn
I don't know which version you're using, but in 2007r3 (which is the oldest version I've installed, maybe it was introduced even earlier) there is the new SpecialFolder module that provides a method to get the user's Application Support folder. Try "f = SpecialFolder.ApplicationData". In even newer version the SpecialFolder module provides a method that lets you get the global Application Support folder again: SpecialFolder.SharedApplicationData.

> Humm.. I thought it pointed to the users, no the admin/root (whatever its called). At least I would thing
> that would be logical thing to do, point to the users Application Support folder.

That was something that always bugged me before the SpecialFolder module was introduced. But it was easy to build my own UserApplicationFolder method:

Function UserApplicationFolder() As FolderItem
return PreferencesFolder.parent.child("Application Support")
Exception err as NilObjectException
return nil
End Function

Some may complain that this code will fail as soon as Apple changes the folder structure of Mac OS X, but IIRC it has been the same since Mac OS X 10.0 (at least concerning the Preferences and the Application Support folder).

Gruß
Christian

----------------------------------------
Christian Dorn
realbasic {a} online.de

REALbasic 2009r5 Studio

iMac 3.06 GHz Intel Core 2 Duo, 4 GB RAM
PowerMac G5 2x2GHz, 1.5 GB RAM
Mac OS X 10.6.2
----------------------------------------







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

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Re: applicationSupportFolder
Date: 01.03.10 23:17 (Mon, 1 Mar 2010 15:17:50 -0700)
From: Norman Palardy

On 1-Mar-10, at 3:03 PM, ER wrote:

>
>>>
>>> It gives me -5000
>>
>> -5000 is indeed a permission problem.
>>
>> Are you sure you're pointing in the same folder (in your app and in
>> the test you made in the Finder) and the app is running as the same
>> user as you (same as the Finder)? Check the absolute path of your
>> folderitem to be sure.
>
> Looks like f *pplicationSupportFolder doesn't point to where I
> though it did. Appears it points to the root/admin (whatever)
> not the users, which seems kind of odd to me. I would think it would
> point to the users.

It does in later versions but this is a very ancient version that
probably uses an ancient API to get that directory

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

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Re: applicationSupportFolder
Date: 01.03.10 23:07 (Mon, 1 Mar 2010 15:07:18 -0700)
From: Norman Palardy

On 1-Mar-10, at 2:09 PM, ER wrote:

>
>>>
>>> Yep, went and made one in the applicationSupport Folder manually.
>>
>> After the CreateAsFolder line, put MsgBox str(f.LastErrorCode).
>> What does it tell?
>
> It gives me -5000

http://support.apple.com/kb/HT2237?viewlocaleà_US
-5000 accessDenied Incorrect access for this file/folder

and in 5.5 ApplicationSupport is the one in The currently active
system folder (I don't know if that is /System/Library/
ApplicationSupport or /Library/ApplicationSupport on OS X)
which is probably not the one you want and that you cant just write to
willy nilly.

What you really probably want is
PreferencesFolder.Parent.Child("Application Support").Child( .... my
app ...... ).child( .. file .....)
which should be in the Users home folder > Library > Application
Support > my app > y data file
(or something like that)

This is one of those things that's been fixed over the years to make
it much easier on you

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

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Re: applicationSupportFolder
Date: 01.03.10 23:03 (Mon, 1 Mar 2010 16:03:19 -0600)
From: ER

>>
>> It gives me -5000
>
> -5000 is indeed a permission problem.
>
> Are you sure you're pointing in the same folder (in your app and in
> the test you made in the Finder) and the app is running as the same
> user as you (same as the Finder)? Check the absolute path of your
> folderitem to be sure.

Looks like f jpplicationSupportFolder doesn't point to where I
though it did. Appears it points to the root/admin (whatever)
not the users, which seems kind of odd to me. I would think it would
point to the users.

Then again what do I know.. ;-)

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

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Re: applicationSupportFolder
Date: 01.03.10 23:00 (Mon, 1 Mar 2010 16:00:23 -0600)
From: ER

On Mar 1, 2010, at 3:21 PM, Christian Dorn wrote:

> ApplicationSupportFolder – which is deprecated and doesn't exist in
> newer version of Rb by the way – points to "/Library/Application
> Support" and not "~/Library/Application Support". As a normal user
> you can't create files/folders in "/Library/Application Support".
>
> Gruß

Humm.. I thought it pointed to the users, no the admin/root (whatever
its called). At least I would thing
that would be logical thing to do, point to the users Application
Support folder.

Oh well, no biggie.
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Re: applicationSupportFolder
Date: 01.03.10 22:26 (Mon, 01 Mar 2010 22:26:37 +0100)
From: Someone
Le 1 mars 10 à 22:09, ER a écrit:

>>> Yep, went and made one in the applicationSupport Folder manually.
>>
>> After the CreateAsFolder line, put MsgBox str(f.LastErrorCode).
>> What does it tell?
>
> It gives me -5000

-5000 is indeed a permission problem.

Are you sure you're pointing in the same folder (in your app and in
the test you made in the Finder) and the app is running as the same
user as you (same as the Finder)? Check the absolute path of your
folderitem to be sure.
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Re: applicationSupportFolder
Date: 01.03.10 22:25 (Mon, 1 Mar 2010 16:25:24 -0500)
From: Charles Yeomans

On Mar 1, 2010, at 4:09 PM, ER wrote:

>
>>>
>>> Yep, went and made one in the applicationSupport Folder manually.
>>
>> After the CreateAsFolder line, put MsgBox str(f.LastErrorCode).
>> What does it tell?
>
> It gives me -5000
>

And that's your answer. Look up the meaning of that error code, and
proceed from there.

Charles Yeomans

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

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Re: applicationSupportFolder
Date: 01.03.10 22:21 (Mon, 1 Mar 2010 22:21:02 +0100)
From: Christian Dorn
ApplicationSupportFolder – which is deprecated and doesn't exist in newer version of Rb by the way – points to "/Library/Application Support" and not "~/Library/Application Support". As a normal user you can't create files/folders in "/Library/Application Support".

Gruß
Christian

----------------------------------------
Christian Dorn
realbasic {a} online.de

REALbasic 2009r5 Studio

iMac 3.06 GHz Intel Core 2 Duo, 4 GB RAM
PowerMac G5 2x2GHz, 1.5 GB RAM
Mac OS X 10.6.2
----------------------------------------







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

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Re: applicationSupportFolder
Date: 01.03.10 22:09 (Mon, 1 Mar 2010 15:09:25 -0600)
From: ER

>>
>> Yep, went and made one in the applicationSupport Folder manually.
>
> After the CreateAsFolder line, put MsgBox str(f.LastErrorCode). What
> does it tell?

It gives me -5000

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

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Re: applicationSupportFolder
Date: 01.03.10 22:08 (Mon, 1 Mar 2010 15:08:50 -0600)
From: ER
>
> Your code does the following steps? Certainly massaged to work with
> your program. When it comes to opening a file for reading or
> writing, don't skimp on the tests that you perform. At least that
> way, should an error occur, you have a better idea what the problem
> is.
>

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

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Re: applicationSupportFolder
Date: 01.03.10 21:16 (Mon, 01 Mar 2010 21:16:45 +0100)
From: Someone
Le 1 mars 10 à 21:10, ER a écrit:

>> An authorization problem, perhaps?
>> Can you actually create the folder manually in the Finder?
>
> Could be...
>
> Yep, went and made one in the applicationSupport Folder manually.

After the CreateAsFolder line, put MsgBox str(f.LastErrorCode). What
does it tell?
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Re: applicationSupportFolder
Date: 01.03.10 21:10 (Mon, 1 Mar 2010 14:10:15 -0600)
From: ER
>
> An authorization problem, perhaps?
> Can you actually create the folder manually in the Finder?

Could be...

Yep, went and made one in the applicationSupport Folder manually.

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

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Re: applicationSupportFolder
Date: 01.03.10 21:08 (Mon, 1 Mar 2010 14:08:57 -0600)
From: ER


>
> First, you should check to see that ApplicationSupportFolder returns
> a non-nil object (it appears to in your case, but it's not
> guaranteed in general), and that it exists. Then check its
> permissions.
>
> Charles Yeomans
>

Yep done that. f kpplicationSupportFolder and its fine.

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

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Re: applicationSupportFolder
Date: 01.03.10 21:01 (Mon, 1 Mar 2010 14:01:22 -0600)
From: Harrie Westphal

On Mar 1, 2010, at 1:25 PM, ER wrote:

> I'm trying to save a file to a folder in the applicationSupportFolder but I'm running
> into a problem that it doesn't exist.
>
> Ok so I point to it
> f = applicationSupportFolder.child("PS")
>
> then see if one exists or nil. If no folder, then create one
> f.createAsFolder
>
> Then I check again for nil or exists and it comes up exists is false.
>
> Is there something special you need to do with applicationSupportFolder ?

Your code does the following steps? Certainly massaged to work with your program. When it comes to opening a file for reading or writing, don't skimp on the tests that you perform. At least that way, should an error occur, you have a better idea what the problem is.

f = applicationSupportFolder
if f = nil then
MsgBox "Nil folderitem for applicationSupportFolder"
return // or whatever is appropriate where your code resides, same for all the other returns here
end if

// just to see that it is pointing to folder you expect plus its permissions are okay
MsgBox f.absolutePath + EndOfLine + Oct(f.Permissions)

if not f.exists then
MsgBox "Crud…applicationSupportFolder does not exist"
return
end if
f = f.child("PS")
if f = nil then
MsgBox "Nil folderitem for PS"
Return
end if
if not f.exists then
f.createAsFolder
end if
if not f.directory then
MsgBox "Dang…PS is a file, not a directory"
Return
end if
f = f.child("NameOfMyFileGoesHere")
if f = nil then
MsgBox "Nil folderitem for NameOfMyFileGoesHere"
Return
end if
if f.exits then
// open file using open method appropriate for this file
else
// open file with create method appropriate for this file
end if

=== A Mac addict in Tennessee ===

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

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Re: applicationSupportFolder
Date: 01.03.10 20:46 (Mon, 01 Mar 2010 20:46:20 +0100)
From: Someone
Le 1 mars 10 à 20:25, ER a écrit:

> Hi -
>
> I'm trying to save a file to a folder in the
> applicationSupportFolder but I'm running
> into a problem that it doesn't exist.
>
> Ok so I point to it
> f = applicationSupportFolder.child("PS")
>
> then see if one exists or nil. If no folder, then create one
> f.createAsFolder
>
> Then I check again for nil or exists and it comes up exists is
> false.
>
> Is there something special you need to do with
> applicationSupportFolder ?
>
> I gotten my app to work with Document folder but the app one is
> being a problem.
>
> I looked in the applicationSupportFolder and no folder has been
> created.

An authorization problem, perhaps?
Can you actually create the folder manually in the Finder?
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Re: applicationSupportFolder
Date: 01.03.10 20:45 (Mon, 1 Mar 2010 14:45:44 -0500)
From: Charles Yeomans

On Mar 1, 2010, at 2:25 PM, ER wrote:

> Hi -
>
> I'm trying to save a file to a folder in the
> applicationSupportFolder but I'm running
> into a problem that it doesn't exist.
>
> Ok so I point to it
> f >pplicationSupportFolder.child("PS")
>
> then see if one exists or nil. If no folder, then create one
> f.createAsFolder
>
> Then I check again for nil or exists and it comes up exists is
> false.
>
> Is there something special you need to do with
> applicationSupportFolder ?
>
> I gotten my app to work with Document folder but the app one is
> being a problem.
>
> I looked in the applicationSupportFolder and no folder has been
> created.

First, you should check to see that ApplicationSupportFolder returns a
non-nil object (it appears to in your case, but it's not guaranteed in
general), and that it exists. Then check its permissions.

Charles Yeomans

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

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>





Links
MBS Realbasic Chart Plugins - Förderverein St. Arnulf Nickenich