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

Creating arrays


  • Subject: Creating arrays
  • From: "John C. Welch" <email@hidden>
  • Date: Wed, 06 Jan 2010 12:07:56 -0500
  • Thread-topic: Creating arrays

Title: Creating arrays
Okay, so I'm working on a Wireless network scan application. Looking through the Cwlan docs, I figure out that the class with the info I need is Cwinterface, and that I need to, on application launch, do an initial scan to determine what the current network is, if any.

Excellent, and look, there's a lovely instance method that does this:

(NSArray*)scanForNetworksWithParameters:(NSDictionary*)parameters
        error:(NSError**)error ;

Beating against growing, but still light AppleScriptObjC documentation, I think I even got the creation of the array I’ll need to get the results of the scan right, (at least it doesn’t error out when it runs:

    on applicationWillFinishLaunching_(aNotification)
        set theCurrentConfiguration to NSArray's array
    end applicationWillFinishLaunching_


So now how do I get from an empty array to one stuffed with the results of
scanForNetworksWithParameters? I don’t actually think I need to care much about the NSDictionary parameters, at least not based on what I saw in CWGlobals.h

(I know I could do this from various command lines much quicker, but I’m really trying to learn how to do it ‘correctly’ as it will serve me better in the long run)

john

--
You better ask before you try and stick your finger there.
 _______________________________________________
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: Creating arrays
      • From: Shane Stanley <email@hidden>
  • Prev by Date: Fwd: how do I make a new window show up?
  • Next by Date: AppleEvent errors
  • Previous by thread: Fwd: how do I make a new window show up?
  • Next by thread: Re: Creating arrays
  • Index(es):
    • Date
    • Thread