Re: Newbie: applescript "call method" to obj-c method (booleans & image data)
Re: Newbie: applescript "call method" to obj-c method (booleans & image data)
- Subject: Re: Newbie: applescript "call method" to obj-c method (booleans & image data)
- From: Loren Ryter <email@hidden>
- Date: Sat, 14 Jun 2008 12:40:05 -0400
- Thread-topic: Newbie: applescript "call method" to obj-c method (booleans & image data)
On 06/14/08 12:17 PM, "Graham Cox" <email@hidden> wrote:
> BOOL* means "pointer to BOOL" not BOOL itself. So you need to remove
> the *.
This worked brilliantly thanks a lot! I literally spent 3 hours on that ;-)
>
>> iconData:[NSImage initWithContentsOfFile:aPath]
>
> should be iconData:[[[NSImage alloc] initWithContentsOfFile:path]
> autorelease]
This did not work so well... Somehow I think iconData needs the NSData of
the NSImage rather than the NSImage?
Here are results:
#1
iconData:[[[NSImage alloc] initWithContentsOfFile:aPath] autorelease]
-->
No system log messages, and Growl notification given without the image icon
(just blank where icon should be). Instead, the icon was drawn rotated and
upside down at the bottom left corner of my GUI. Weird??
#2
iconData:[[[NSImage alloc] imageNamed:anApp] autorelease]
--> System.log:
*** -[NSImage imageNamed:]: unrecognized selector sent to instance 0x60b0390
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden