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: Frank Bitterlich <bitterlich2@gsco.de>
Date: Fri, 27 Feb 2009 17:48:24 +0100
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: <2921880F-2507-4458-AB81-09D14D9EB509@declareSub.com>
References: <7DE07580-559B-4FE4-B264-37208490E1A6@gsco.de> <2921880F-2507-4458-AB81-09D14D9EB509@declareSub.com>
Reply-to: REALbasic NUG <realbasic-nug@lists.realsoftware.com>
Sender: realbasic-nug-bounces@lists.realsoftware.com
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>


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