[Mono-osx] [MonoMac] KVC, KVO api cleanup

Miguel de Icaza miguel at novell.com
Mon Jan 10 17:56:46 EST 2011


Hello,

    Just for the record, we discussed this on IRC.

    Those APIs use NSStrings, because in various cases the methods that
listen happen to do pointer comparisons instead of content comparisons,
so we do need to expose the actual NSString, we cant use a new NSString
with the same contents.

    We can revisit this in specific cases, but I would rather spend time
elsewhere for now.

> 
> Concerning the following methods:
> 
>         ObserveValue
>         AddObserver
>         RemoveObserver
>         WillChangeValue
>         DidChangeValue
>         WillChange
>         DidChange
>         WillChange
>         DidChange
>         GetKeyPathsForValuesAffecting
>         AutomaticallyNotifiesObserversForKey
>         ValueForKey
>         SetValueForKey
>         ValueForKeyPath
>         SetValueForKeyPath
>         ValueForUndefinedKey
>         SetValueForUndefinedKey
>         SetNilValueForKey
> 
> Right now the key and keyPath are NSStrings.  Can we move them to type 
> strings?
> 
> That will clean up the programs, keep casting down to a minimum and 
> bring them into line with the Binding methods that already use string 
> instead of NSString.
> 
> I can have a patch for you in just a little while.
> 
> Kenneth
> 
> _______________________________________________
> Mono-osx mailing list
> Mono-osx at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-osx




More information about the Mono-osx mailing list