On Apr 04, 2007, at 15:21 UTC, Bastian Bense wrote:
> 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)
Ow. I hope you have no intention of running this code on the Mac,
where absolute paths are evil and are not a reliable way of identifying
files.
> tmpFI2's AbsolutePath is always correct, but ShellPath sporadically
> just gives me /Users/bbense/Desktop instead of
> /Users/bbense/Desktop/test.pdf.
Double-ow. Sounds like you ARE doing this on a Mac. Please don't do
that. Never pass an absolute path to GetFolderItem.
I would say, though, that you've found an unexpected bug if the
ShellPath doesn't include the .Name of a file, whether it's a file that
exists or not.
> 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.
That's a weird one. However, if it only happens when you do something
dangerous and evil like calling GetFolderItem with an AbsolutePath,
then I personally am not going to worry about it. :)
Best,
- Joe
--
Joe Strout -- [EMAIL PROTECTED]
Verified Express, LLC "Making the Internet a Better Place"
http://www.verex.com/
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>