[Mono-osx] [MonoMac] Bindings Regression Tests

kjpou kjpou at pt.lu
Mon Nov 29 01:55:22 EST 2010


Miguel

I just updated the maccore and monomac master sources again and all is 
working fine!!!!!!!!!!

Now overriding the GetValueForKey and SetValueForKey are working as well 
as [Connect] attribute.

Great!!!!!

Thanks guys.

Kenneth

On 11/29/10 6:39 AM, kjpou wrote:
> Here is an example that I hope will explain what I mean.
>
> Let's hope I grabbed the correct one this time.  I have so many 
> different tests lying around ....
>
> Kenneth
>
> Here is the text that I sent to the list:
>
> -----------------------------------------------------------------------
>
> Hello all
>
> Here is another attempt at making the Sample's bindings C#-ish.
>
> With doing it this way there are no [Export(XXXX)] used and the Person 
> class is very simple.  The binding in IB are mapped directly to Person 
> properties.
>
> Implementing the sample this way I was thinking that maybe the 
> NSObject2.cs class could be extended with some helper methods of the form:
>
>         public virtual bool CanConvertFrom(Type sourceType)
>
>         public virtual bool CanConvertTo(Type destinationType)
>
>         public virtual object ConvertFrom(object value)
>
>         public virtual object ConvertTo(Type destinationType)
>
> Then in each Class that derives from NSObject could override these 
> methods with their specific implementation that corresponds to what 
> the class accepts in their respective -> public static implicit 
> operator <- implementations.
>
> At the very least a default type converter in the genre of the 
> provided MonoMacTypeConverter.cs class provided.  That way developers 
> would have a lot of the implementation hidden as was suggested below.
>
> Just throwing some ideas out there.
>
> Kenneth
>
>
>
>
> On 11/29/10 6:07 AM, Miguel de Icaza wrote:
>>
>>
>>     Concerning the SetValueForKey and GetValueForKey, those were
>>     working as well and now are not.  Shouldn't we be able to
>>     override those methods and get it to work the same way?  In the
>>     last PopupBinding sample program it worked fine as well and now
>>     it just blows up with the error message below.
>>
>>     You can see the error from the last PopupBindings project that I
>>     sent to the list.  It uses reflection to get and set the
>>     properties instead of [Connect] or [Export].
>>
>>
>> I am not sure I follow the question here at all.
>>
>> Miguel
>
>
> _______________________________________________
> Mono-osx mailing list
> Mono-osx at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-osx
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-osx/attachments/20101129/82a30aba/attachment-0001.html 


More information about the Mono-osx mailing list