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

2016-02-14 Thread Samuel Williams
Yeah, the easiest solution was to not use a dictionary but use a class, which copied the data into the dictionary. Here is the top level sheet: class PMSRConfigurationSheet: NSWindowController { dynamic var metadata: [String : AnyObject] = [String : AnyObject]() override class func keyPathsFor

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

2016-02-14 Thread Quincey Morris
(sorry about the previous post, hit Send early by accident) On Feb 14, 2016, at 02:06 , Samuel Williams mailto:space.ship.travel...@gmail.com>> wrote: > > 2/ Should I prefer NSMutableDictionary in the Swift code? Is your Swift property declared ‘dynamic’? Also, keep in mind that the Swift type

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

2016-02-14 Thread Quincey Morris
On Feb 14, 2016, at 02:06 , Samuel Williams 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, __

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

2016-02-14 Thread Jens Alfke
> On Feb 14, 2016, at 2:06 AM, Samuel Williams > 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

Swift bindings issue, Swift.Dictionary, NSMutableDictionary and NSObjectController

2016-02-14 Thread Samuel Williams
I have a .xib with a NSObjectController with it's content bound to a Swift [String : AnyObject] variable, but get the following error: *Cocoa Bindings: Error setting value for key path selection.startDate of object [object class: NSMutableDictionary] (from bound object ): [<_TtGCSs29_NativeDiction