When you import a picture into your project by dragging it into the
Project
window or choosing Import from the File menu, the picture will be loaded
into memory when you run your program regardless of whether or not the
picture is used. There are technical reasons for this which I won't go
into
now.
If you have several large pictures, your application may not behavior
very
well as it could run out of memory. If you have large pictures, consider
storing them externally and loading them with the GetFolderItem method
or
storing them in PICT resources and using the ResourceFork GetPicture
method
to load them. Note that storing them in PICT resources is not cross
platform
compatible so consider this if you are going to be creating a Windows
version of your application.
--
Geoff Perlman
President & CEO
REAL Software, Inc.
http://www.realsoftware.com
mailto:geoff at realsoftware dot com
Phone: 512-263-1233 x711
Fax: 512-263-1441
- - - - - - - - - -
Got a useful tip to share? Send it to us at:
REALbasic-tips at lists dot realsoftware dot com dot
For list commands, send "Help" in the body of a message to
<requests at lists dot realsoftware dot com>
|