OpenAsPicture cannot open an .icns file.
Charles Yeomans
On Dec 31, 2008, at 12:08 PM, Lennox Jacob wrote:
I tried this:
#if TargetMacOS then
Dim f as FolderItem
Dim p as Picture
f=
SpecialFolder
.Applications
.child
("Safari
.app").child("Contents").child("Resources").Child("compass.icns")
If f <> Nil then
'f.launch 'This launches Preview and displays the compass as a
picture
p=f.OpenAsPicture
Canvas1.backdrop=p
End if
#endif
but the compass was not displayed in Canvas1, nothing happened.
Lennox
--- On Wed, 12/31/08, Norman Palardy <npalardy@great-white-software.com
> wrote:
From: Norman Palardy <npalardy@great-white-software.com>
Subject: Re: "Resource not found!" error
To: "REALbasic NUG" <realbasic-nug@lists.realsoftware.com>
Date: Wednesday, December 31, 2008, 8:51 AM
Many applications are going away from any kinds of resources
You might need to use a different mechanism to get the icon
MacOSLib has this implemented in its MacIcon classes which
can grab the icon for a given folderItem
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>
|