missing value does not get passed in lists and records
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