• 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
missing value does not get passed in lists and records
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

missing value does not get passed in lists and records


  • Subject: missing value does not get passed in lists and records
  • From: Dave <email@hidden>
  • Date: Tue, 4 Jan 2011 07:29:02 -0600

Beware when using 'missing value' in AppleScript lists and records being passed between scripts or Obj-C methods. The bridge turns these into NSNull objects going out from a script but does not reconvert them back to 'missing value' coming back in.

Since NSArray and NSDictionary do not permit nil as elements, the conversion to NSNull makes sense. But the lack of reverse conversion means you must special handle every item from a list or record that might be a missing value:

  if theItem is not missing value then if theItem is current application's NSNull's |null|() then set theItem to missing value

Ouch.

 _______________________________________________
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: missing value does not get passed in lists and records
      • From: Shane Stanley <email@hidden>
  • Prev by Date: Re: Script Editor forces Terminate() in place of terminate()
  • Next by Date: Re: missing value does not get passed in lists and records
  • Previous by thread: Re: Script Editor forces Terminate() in place of terminate()
  • Next by thread: Re: missing value does not get passed in lists and records
  • Index(es):
    • Date
    • Thread