[Mono-osx] [MonoMac] PopupBindings Sample

kjpou kjpou at pt.lu
Tue Nov 23 10:22:50 EST 2010


Miguel

Attached is a new PopupBindings Sample.  Not sure what I was thinking.  
Take a look and see if this is what you wanted.

Also, I was thinking that shouldn't there be a way to add an attribute 
to the Getter and Setter that will bind directly for GetValueForKey and 
SetValueForKey?  That would make it really simple.  Was going to ask 
that before but got sidetracked.

Kenneth

On 11/23/10 3:40 PM, Miguel de Icaza wrote:
> Hello,
>
>     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.
>
>
> We should change that, and then introduce a "LowLevelSetValueForKey" 
> if we need, like we do in NSDictionary for those that want to pass 
> handles directly.
>
>     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.
>
>
> The good news is that NSDictionary implements IDictionary, so we can 
> always treat NSDictionary in a .NET way.
>
> The problem is that it comes with some overhead, so it might be a good 
> idea to write NSDictionary->Dictionary and back helper methods.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-osx/attachments/20101123/59282b26/attachment-0001.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PopupBindings.zip
Type: application/zip
Size: 2032806 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/mono-osx/attachments/20101123/59282b26/attachment-0001.zip 


More information about the Mono-osx mailing list