Re: Swift bindings issue, Swift.Dictionary, NSMutableDictionary and NSObjectController
Re: Swift bindings issue, Swift.Dictionary, NSMutableDictionary and NSObjectController
- Subject: Re: Swift bindings issue, Swift.Dictionary, NSMutableDictionary and NSObjectController
- From: Quincey Morris <email@hidden>
- Date: Sun, 14 Feb 2016 11:35:05 -0800
- Feedback-id: 167118m:167118agrif8a:167118s7I7nZYzbs:SMTPCORP
(sorry about the previous post, hit Send early by accident)
On Feb 14, 2016, at 02:06 , Samuel Williams <email@hidden <mailto:email@hidden>> wrote:
>
> 2/ Should I prefer NSMutableDictionary in the Swift code?
Is your Swift property declared ‘dynamic’?
Also, keep in mind that the Swift type that’s bridgeable to NSDictionary is [NSObject: AnyObject]. Your type [String: AnyObject] can be upcast to a bridgeable type, but things get a bit murky about what’s supposed to happen when.
Also, I recommend that you do *not* use a mutable dictionary as a cheap replacement for a class with its own properties. It may seem like a good shortcut, but it’s going to have limitations (perhaps unrelated to the current problem) when you start binding to it.
_______________________________________________
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