How to use alloc/init... to create an object
How to use alloc/init... to create an object
- Subject: How to use alloc/init... to create an object
- From: David Hoerl <email@hidden>
- Date: Thu, 29 Sep 2011 14:00:05 -0400
All the example scripts I've seen use a class method to return some kind
of object.
I'm trying to use applescriptobjc in a pure script to create an NSImage
object. Conceptually this is what I want to do:
property NSImage : class "NSImage"
set theImage to NSImage's alloc()
set theImage to theImage's initByReferencingFile_("/tmp/wine.jpg" as
POSIX file) )
NSImage offers no factory method to return an image. The above fails on
the alloc() line.
How does one do this?
Thanks,
David
_______________________________________________
Do not post admin requests to the list. They will be ignored.
applescriptobjc-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden