realbasic-nug
[Top] [All Lists]

Re: FolderItem.SaveAsPicture() limited to 32-character filenames?

To: REALbasic NUG <realbasic-nug@lists.realsoftware.com>
Subject: Re: FolderItem.SaveAsPicture() limited to 32-character filenames?
From: Joe Huber <joehuber@talasoft.com>
Date: Thu, 26 Feb 2009 14:50:12 -0800
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: <7DE07580-559B-4FE4-B264-37208490E1A6@gsco.de>
References: <7DE07580-559B-4FE4-B264-37208490E1A6@gsco.de>
Reply-to: REALbasic NUG <realbasic-nug@lists.realsoftware.com>
Sender: realbasic-nug-bounces@lists.realsoftware.com
Frank

I don't know about that specific function, but I've encountered several cases where QuickTime based file operations from RB would limit the file name to 31 characters, and also barf if the path contained any non-ASCII characters. I would not be surprised it SaveAsPicture was using QuickTime to save at least some of its formats, and thus encounter the same issue.

As you said, the workaround is to save to a temp file with a short ASCII name and then rename it to the desired longer name. In general, RB's non-QuickTime based operations seem to work well with long file names.

Regards,
Joe Huber


At 10:40 PM +0100 2/26/09, Frank Bitterlich wrote:
Hi,

I'm experiencing stuff which made me rub my eyes in disbelief... A file I created with FolderItem.SaveAsPicture() mysteriously experienced a "cut" to the filename - the extension read ".pn" instead of ".png". Further experimenting appears to show that the filename is being cut off after the 32nd character every time. And yes, this is on Mac OS X, not Mac OS 9 ;)

What's worse is that this filename cut is not reflected in the .Name or .AbsolutePath properties of the FolderItem. As a side-effect, the SaveFileAs() yields an errro code of 101 (="File not found").

I tried to "MoveFileTo" the file to another name, but this appears not to work - it might be due to the fact that the folderItem "disconnected" from the file - after all the Filename property does not match the true file name.

Can anybody confirm this? Or should I hunt for some stupid/obscure bug in my own code (might not be the first time)? If this is really a RB bug, I might try to create a temporary file first, and later move it into place. But I guess that GetTemporaryFolderItem might return longer-than-32-characters filenames as well, right?

Hmmm....

Cheers,
   Frank+++


--

Günter Schmidt GmbH
Frank Bitterlich             eMail: bitterlich@gsco.de
Ben-Gurion-Ring 21           WWW:   http://www.gsco.de/
D-60437 Frankfurt            Tel.:  069 / 156809-29
GERMANY                      Fax:   069 / 156809-28
Geschäftsführer: Jürgen Hartwich
AG Frankfurt am Main, HRB 76504 - USt.-ID: DE235219624






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


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