[Mono-osx] [MonoMac] PopupBindings Sample
kjpou at pt.lu
Tue Nov 23 01:45:14 EST 2010
I think you are referring to the Person.cs class correct?
I at first write the Person.cs class with C# native type but what I
found myself doing all the time was converting to and from native to
NSString all over the place so thought that made the code messy. For
instance in the SetValueForKey method. If those methods should be using
string instead of NSString I could change them when I find them.
I totally agree with you on the C# 3 features. One of the questions
that I was going to post was how to get around the NSDictionary use and
convert back and forth to native Dictionary types easily. I guess I am
missing that part to start using more of the C# features. An example
would definitely be welcome on how to go about that.
On 11/23/10 7:20 AM, Miguel de Icaza wrote:
> Here is another sample program that demonstrates the use of
> bindings for
> Popup Button.
> The information information that is bound to in the
> NSArrayController is a
> customer class called Person.cs that implements the KVO model.
> One question: is there a reason to use all of the
> NSString/NSDictionary types in this sample?
> In general, with MonoMac, we try to avoid exposing APIs based on
> NSString and other Foundation types unless it is absolutely necessary.
> [I added the sample to the tree, but if I can, I would like to use
> more C# 3 features and fewer NSString types]
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Mono-osx