• 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
How to use alloc/init... to create an object
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Subject: How to use alloc/init... to create an object
  • From: Chris Paveglio <email@hidden>
  • Date: Thu, 29 Sep 2011 19:47:57 +0000
  • Thread-topic: How to use alloc/init... to create an object

NSImage has +ImageNamed or all the -initBy... -initWith... things.

I use:
set newImage to current application's NSImage's alloc()'s
initWithContentsOfURL_(randomImage_())

tell imageWell to setImage_(newImage)


Where randomImage_() returns an NSURL object for the creation. It works for
me. Maybe there is trouble with your "as posix" statement part.

Chris

 _______________________________________________
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

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