Xojo Conferences
XDCMay2019MiamiUSA

Paths et al (Real Studio getting started Mailinglist archive)

Back to the thread list
Previous thread: Download Manager in WebKit
Next thread: editField data to be flashing after updating


RB Database   -   tom.russell transport.alstom.com
  Paths et al   -   Kim Kohen
   Re: Paths et al   -   Brady Duga
   RE: Paths et al   -   RBNUBE
    RE: Paths et al   -   POIDINGER, Michael [JJRAU]
    RE: Paths et al   -   POIDINGER, Michael [JJRAU]
     Re: Paths et al   -   Brady Duga

Paths et al
Date: 04.02.05 03:32 (Fri, 04 Feb 2005 13:32:52 +1100)
From: Kim Kohen
Hi all,

I know from past experience that the mere mention of absolute paths is
frowned upon so I just want to ask a basic question before proceeding down a
particular path:)

I'm re-writing an Applescript studio application into RB. It is used to
generate .htaccess and .htpasswd entries for securing web directories. I
want the application to be able to access our web server from a remote
machine on the LAN; the volume will be mounted via AFP.

On my main window I have a 'choose root folder' which is the base directory
for where everything will happen. I'd like to write this path out in a prefs
file so it only has to be selected once and can be read as required. The
question is if it's OK to use this absolute path or if I need to dissect it
down into volume/parent/child format?

cheers

Kim

_______________________________________________
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>

Re: Paths et al
Date: 04.02.05 04:23 (Thu, 3 Feb 2005 19:23:49 -0800)
From: Brady Duga

On Feb 3, 2005, at 6:32 PM, Kim Kohen wrote:
> On my main window I have a 'choose root folder' which is the base
> directory
> for where everything will happen. I'd like to write this path out in a
> prefs
> file so it only has to be selected once and can be read as required.
> The
> question is if it's OK to use this absolute path or if I need to
> dissect it
> down into volume/parent/child format?

Neither - you should use FolderItem.GetSaveInfo and .GetRelative to
create an appropriate binary piece of data that points to the folder
for the platform you happen to be running on (see the FolderItem docs
for an example). Note that since they are binary, you can't save them
directly into a text file, which is probably what your prefs files is.
To save them in a text file, you should use the EncodeBase64 function,
which will return the binary data as a string. You can then read it
back later and pass it to DecodeBase64 to get the original binary data
back, which can then be passed to GetRelative.

--Brady
The La Jolla Underground

_______________________________________________
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>

RE: Paths et al
Date: 04.02.05 10:28 (Fri, 4 Feb 2005 04:28:10 -0500)
From: RBNUBE
IF I understand correctly, absolute paths are mainly a problem in
Macintosh environments where it's possible that more than one volume can
have the same name. I don't think this is an issue on PC. You can use
the absolute path, but you should be prepared to fix this in the future
should problems arise. You might want to reconsider this method if
you're going to release this application to the general public.

However, since you're mounting by afp, is this really an issue for you?
I think afp is a URL rather than an absolute path. If you're using a
URL, the URL should be unique by nature? Not sure...

I'm also glad you're asking this question because it might tie in with a
question I asked earlier. How are you prompting your users to mount a
volume if it is not already mounted?



-----Original Message-----
From: <email address removed>
[mailto:<email address removed>] On Behalf Of Kim
Kohen
Sent: Thursday, February 03, 2005 9:33 PM
To: Getting Started
Subject: Paths et al

Hi all,

I know from past experience that the mere mention of absolute paths is
frowned upon so I just want to ask a basic question before proceeding
down a particular path:)

I'm re-writing an Applescript studio application into RB. It is used to
generate .htaccess and .htpasswd entries for securing web directories. I
want the application to be able to access our web server from a remote
machine on the LAN; the volume will be mounted via AFP.

On my main window I have a 'choose root folder' which is the base
directory for where everything will happen. I'd like to write this path
out in a prefs file so it only has to be selected once and can be read
as required. The question is if it's OK to use this absolute path or if
I need to dissect it down into volume/parent/child format?

cheers

Kim

_______________________________________________
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>


_______________________________________________
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>

RE: Paths et al
Date: 04.02.05 04:00 (Fri, 4 Feb 2005 14:00:52 +1100 )
From: POIDINGER, Michael [JJRAU]
> -----Original Message-----
> From: <email address removed>
> [mailto:<email address removed>] On
> Behalf Of Kim Kohen
> Sent: Friday, February 04, 2005 1:33 PM
> To: Getting Started
> Subject: Paths et al
>
> Hi all,
>
> I know from past experience that the mere mention of absolute
> paths is frowned upon so I just want to ask a basic question
> before proceeding down a particular path:)
>
> I'm re-writing an Applescript studio application into RB. It
> is used to generate .htaccess and .htpasswd entries for
> securing web directories. I want the application to be able
> to access our web server from a remote machine on the LAN;
> the volume will be mounted via AFP.
>
> On my main window I have a 'choose root folder' which is the
> base directory for where everything will happen. I'd like to
> write this path out in a prefs file so it only has to be
> selected once and can be read as required. The question is if
> it's OK to use this absolute path or if I need to dissect it
> down into volume/parent/child format?
>

It has worked for me being saved as an absolute path. You will need to be
careful that the mount has the same name on each machine, and watch syntax
if you are using a mixture of PCs ad Macs (shell path might be more
appropriate)

In fact, my final solution was to use a database to store the chosen root
folder keyed to the mac address of each machine and username, so each
machine only needed to choose root folder once. You could use IP instead,
but DHCP may interfere (if you use it)

Mike
_______________________________________________
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>

RE: Paths et al
Date: 04.02.05 04:33 (Fri, 4 Feb 2005 14:33:51 +1100 )
From: POIDINGER, Michael [JJRAU]
>
> Neither - you should use FolderItem.GetSaveInfo and
> .GetRelative to create an appropriate binary piece of data
> that points to the folder for the platform you happen to be
> running on (see the FolderItem docs for an example). Note
> that since they are binary, you can't save them directly into

Nor can you read them, which is why I don't use them. Makes cross-machine
testing a pain

Mike
_______________________________________________
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>

Re: Paths et al
Date: 04.02.05 05:09 (Thu, 3 Feb 2005 20:09:46 -0800)
From: Brady Duga

On Feb 3, 2005, at 7:33 PM, POIDINGER, Michael [JJRAU] wrote:
>
> Nor can you read them, which is why I don't use them. Makes
> cross-machine
> testing a pain

Perhaps, but the fact they will actually work often outweighs such
concerns.

--Brady
The La Jolla Underground

_______________________________________________
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>