• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: How to use alloc/init... to create an object
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to use alloc/init... to create an object


  • Subject: Re: How to use alloc/init... to create an object
  • From: David Hoerl <email@hidden>
  • Date: Thu, 29 Sep 2011 15:20:40 -0400

> Try -
>
> property parent : class "NSObject"
>
> set theImage to current application's NSImage's alloc()'s initWithContentsOfFile_("/tmp/wine.jpg")
>
> Craig Sutherland



Thanks! I was sent a link off list by a kind soul with a long tortuous thread on someone else trying to do the same thing as me:


  http://macscripter.net/viewtopic.php?id=30462

There were a lot of complications!

In any case, can you tell me what does the first line - the property parent line do? I would have thought I'd only need that if I was defining a class. Just curious...

Also, I hadn't put in the "current application's" as I was unsure if I'd need that in a simple AppleScript.

Thanks so much for the reply!

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


  • Follow-Ups:
    • Re: How to use alloc/init... to create an object
      • From: Craig Sutherland <email@hidden>
References: 
 >How to use alloc/init... to create an object (From: David Hoerl <email@hidden>)

  • Prev by Date: How to use alloc/init... to create an object
  • Next by Date: How to use alloc/init... to create an object
  • Previous by thread: How to use alloc/init... to create an object
  • Next by thread: Re: How to use alloc/init... to create an object
  • Index(es):
    • Date
    • Thread