> On 17 Jun 2017, at 16:36, Charles Srstka <cocoa...@charlessoft.com> wrote:
> 
>> On Jun 17, 2017, at 8:36 AM, Jonathan Mitchell <li...@mugginsoft.com 
>> <mailto:li...@mugginsoft.com>> wrote:
> 
> 
> Just tested it on 10.9; it works :-)
> 
> import Foundation
> 
> class C: NSObject {
>     @objc dynamic var foo = "Foo"
> }
> 
> let c = C()
> 
> let observer = c.observe(\.foo) { obj, _ in
>     print("Foo changed: now it's \(obj.foo)")
> }
> 
> c.foo = "Bar"
> 
> Running it on my Mavs VirtualBox VM, this outputs:
> 
> $ ./kvotest
> Foo changed: now it's Bar
> 
> Charles

Thanks for taking the time to test that.
I haven’t had time this week to take look at the new 10.13 APIs.

Will the above translate to Obj-C?

J
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to