realbasic-nug
[Top] [All Lists]

Re: Windows and SpecialFolder problems

To: REALbasic NUG <realbasic-nug@lists.realsoftware.com>
Subject: Re: Windows and SpecialFolder problems
From: Tim Jones <tjmac@tolisgroup.com>
Date: Tue, 28 Jul 2009 15:35:10 -0700
Authentication-results: mx.google.com; spf=neutral (google.com: 74.124.194.228 is neither permitted nor denied by best guess record for domain of realbasic-nug-bounces@lists.realsoftware.com) smtp.mail=realbasic-nug-bounces@lists.realsoftware.com
Delivered-to: listarchive@realsoftware.com
In-reply-to: <60614.96.225.224.254.1248819942.squirrel@rpgportland.com>
References: <6DFE26A8-4824-4A0E-AA61-9B13F5D19E32@tolisgroup.com> <60614.96.225.224.254.1248819942.squirrel@rpgportland.com>
Reply-to: REALbasic NUG <realbasic-nug@lists.realsoftware.com>
Sender: realbasic-nug-bounces@lists.realsoftware.com
On Jul 28, 2009, at 3:25 PM, fargo@rpgportland.com wrote:

Hi Folks,

A while back, there was a discussion about SpecialFolder and family
on Windows systems.  IIRC, the problem was that certain combinations
of SpecialFolder were returning NIL when the path definitely existed.

Was a solution ever uncovered?

I't trying to create a text file in the users home directory, but the
following always returns Nil:

        Dim fo As FolderItem

        fo = SpecialFolder.UserHome.Child(tempName) /// Nil here...
        tos = fo.CreateTextFile

Have I totally gone braindead on a Tuesday, or is there something
wrong in the compiler?

Thanks,
Tim


According the LR (in 2006R3 anyway) UserHome is nil for Windows. Why? No idea. You could use SpecialFolder.Desktop.Parent though. I think that'd
work.

Doh!  In fact, SpecialFolder.Documents would actually be more useful.

Thanks!

TIm


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

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


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