• 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: Creating arrays
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Creating arrays


  • Subject: Re: Creating arrays
  • From: Shane Stanley <email@hidden>
  • Date: Thu, 07 Jan 2010 09:10:54 +1100
  • Thread-topic: Creating arrays

First of all, that method is an instance method, so you're going to need an
instance of CWInterface to work with.

For the default interface, you'd use the class method interface:

 set myCWI to current application's CWInterface's interface()

For a named interface, try something like:

 set myCWI to current application's CWInterface's interfaceWithName_("en1")

Or you can get a list of all of them using supportedInterfaces(), and loop
through them.

Then you can send the method to your instance, like so:

set theObjects to  myCWI's scanForNetworksWithParameters_error_(missing
value, missing value)
repeat with anObject in (theObjects as list)
log anObject's ssid()
log anObject's bssid()
end repeat

You don't need to make an array -- you get supplied with one, which you can
coerce to an AS list if it suits.

--
Shane Stanley <email@hidden>
AppleScript Pro, April 2010, Florida <http://www.applescriptpro.com>


 _______________________________________________
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

References: 
 >Creating arrays (From: "John C. Welch" <email@hidden>)

  • Prev by Date: AppleEvent errors
  • Next by Date: Re: AppleEvent errors
  • Previous by thread: Creating arrays
  • Next by thread: AppleEvent errors
  • Index(es):
    • Date
    • Thread