On Apr 04, 2007, at 9:21 AM, Bastian Bense wrote:

> Hello,
>
> I think this time I found a weird bug in REALbasic (2007r2, but  
> existed before).
>
> The following code:
> ---
> dim tmpFI, tmpFI2 as folderItem
> dim tmpPath as string
>
> tmpFI = desktopFolder.child("test.pdf")
> tmpPath = tmpFI.absolutePath
> tmpFI2 = getFolderItem(tmpPath)
> ---
>
> tmpFI2's AbsolutePath is always correct, but ShellPath sporadically
> just gives me /Users/bbense/Desktop  instead of
> /Users/bbense/Desktop/test.pdf.
>
> tmpFI's AbsolutePath AND ShellPath are both fine.
>
> Is there a bug that may cause this? I have a feeling that it has to do
> with GetFolderItem() handling strings that are created by
> AbsolutePath. I checked the encodings, which are both ASCII.
>
> This bug happens sporadically, so it works fine this time, and next
> time it probably doesnt. All other properties of the FolderItem look
> correct and identical to the first object.

try adding the extra parameter to GetFolderItem that tells it what  
kind o path you are giving it

         tmpFI2 = getFolderItem(tmpPath, FodlerItem.PathTypeAbsolute)
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

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

Reply via email to