• 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: Swift bindings issue, Swift.Dictionary, NSMutableDictionary and NSObjectController
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Swift bindings issue, Swift.Dictionary, NSMutableDictionary and NSObjectController


  • Subject: Re: Swift bindings issue, Swift.Dictionary, NSMutableDictionary and NSObjectController
  • From: Jens Alfke <email@hidden>
  • Date: Sun, 14 Feb 2016 10:58:11 -0800

> On Feb 14, 2016, at 2:06 AM, Samuel Williams <email@hidden> wrote:
>
> 2/ Should I prefer NSMutableDictionary in the Swift code?

It looks like you’ll need to use Foundation collection classes, for properties that you want to bind in this way.

Remember, Swift’s native arrays and dictionaries aren’t toll-free bridged to NSArray and NSDictionary, so you can’t always use them interchangeably. They’re just copied to/from Foundation objects on demand, by the compiler. But binding doesn’t happen at compile time, so at runtime you end up with the key-value-coding implementation trying to operate on a native Swift object it doesn’t understand.

—Jens
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden


References: 
 >Swift bindings issue, Swift.Dictionary, NSMutableDictionary and NSObjectController (From: Samuel Williams <email@hidden>)

  • Prev by Date: Re: Deleting an file that's been NSData memory mapped - safe?
  • Next by Date: Re: Swift bindings issue, Swift.Dictionary, NSMutableDictionary and NSObjectController
  • Previous by thread: Swift bindings issue, Swift.Dictionary, NSMutableDictionary and NSObjectController
  • Next by thread: Re: Swift bindings issue, Swift.Dictionary, NSMutableDictionary and NSObjectController
  • Index(es):
    • Date
    • Thread