Am 26.02.2009 um 22:59 schrieb Charles Yeomans:
On Feb 26, 2009, at 4:40 PM, 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 version of REALbasic? With Rb 2008r51 and Mac OS 10.5.6, this
operation does the right thing.
Not for me (exact same versions - 2008_5.1 and 10.5.6). This code....
dim fi as FolderItem
dim pic as Picture
dim msg as string
dim errNo as integer
fi =
SpecialFolder
..Desktop.Child("aaaaabbbbbcccccdddddeeeeefffff1234567890.png")
pic = NewPicture(50, 50, 32)
pic.Graphics.ForeColor = &cffffff
pic.Graphics.FillRect 0, 0, 50, 50
pic.Graphics.ForeColor = &cff0000
pic.Graphics.DrawOval 0, 0, 50, 50
fi.SaveAsPicture(pic, fi.SaveAsPNG)
errNo = fi.LastErrorCode
msg = "The folderItem has the name """ + fi.Name
msg = msg + """ and is reporting the file as "
if not fi.Exists then
msg = msg + "NOT existing. "
else
msg = msg + "existing. "
end if
msg = msg + "The LastErrorCode is " + str(errNo)
MsgBox msg
.... demonstrates the problem. The resulting file name is cut off after
the "1". LastError is 101. And .exists is false.
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>
|