[prev in list] [next in list] [prev in thread] [next in thread]
List: mono-osx
Subject: Re: [Mono-osx] [Monomac] [PATCH] New Villain tracker sample
From: Miguel de Icaza <miguel () novell ! com>
Date: 2010-12-31 13:27:58
Message-ID: AANLkTikpYCEvke1=8zBiYc1CPa1GaUqeZOw3T0fTrBA4 () mail ! gmail ! com
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
Hello,
I have not quite started using the new bindings/events in the sample.
Here is the problem: when we use the ObjC/Delegate to C# event mapping,
we basically implement a class that has all of the delegate methods
implemented, and we just raise the events or call the method that returns a
value as needed. There is a problem though, when Objective-C sees that we
have implemented a method (like in our case), it will not use any of its
default implementations, and instead rely on ours.
And I am not 100% sure that I got all of the DefaultValue arguments
right, so for now the sample keeps using in the major places the Delegates.
I only used events in a couple of places.
On Thu, Dec 30, 2010 at 11:40 PM, Oleg Zee <olegzzzz@gmail.com> wrote:
> I see how it works now and thank you for updated NSTableView bindings which
> make use of table views pretty straightforward.
>
> Oleg.
>
>
>
> Thanks for the updated code!
>
> I made a handful of extra updates to the code to make it a little shorter.
>
> Miguel
>
> On Thu, Dec 30, 2010 at 4:56 PM, Oleg Zee <olegzzzz@gmail.com> wrote:
>
>> Miguel,
>>
>> here's the patch to previous one. Sorry, cant provide combined patch (it
>> might take another couple days to read another book on git :)).
>> I simply replaced Dictionary with Villain POCO which saved not too much
>> code while readability is much better now.
>>
>>
>>
>> Thanks,
>> Oleg.
>>
>> Hello Oleg,
>>
>> Thanks for contributing this sample.
>>
>> One question: is there a reason to use a Dictionary<string,NSObject>
>> as the data storage instead of a strongly typed Villain data structure?
>>
>> It just seems like there is a lot of typecasting going on in the code,
>> and I would like to showcase the benefits of using C#. Could you redo the
>> sample to use a Villain data type that is used instead of a Dictionary?
>>
>> Miguel
>>
>> On Tue, Dec 28, 2010 at 3:16 PM, Oleg Zaimkin <olegzzzz@gmail.com> wrote:
>>
>>> Yet another sample demonstrating plain Cocoa API (no data binding),
>>> NSTableView, implementing delegates etc.
>>> Based on chapter 4 and 5 from "Learn Cocoa on the Mac".
>>>
>>> Thanks, Oleg.
>>>
>>> _______________________________________________
>>> Mono-osx mailing list
>>> Mono-osx@lists.ximian.com
>>> http://lists.ximian.com/mailman/listinfo/mono-osx
>>>
>>>
>>
>>
>> _______________________________________________
>> Mono-osx mailing list
>> Mono-osx@lists.ximian.com
>> http://lists.ximian.com/mailman/listinfo/mono-osx
>>
>>
>
>
[Attachment #5 (text/html)]
Hello,<div><br></div><div> I have not quite started using the new bindings/events \
in the sample.</div><div><br></div><div> Here is the problem: when we use the \
ObjC/Delegate to C# event mapping, we basically implement a class that has all of the \
delegate methods implemented, and we just raise the events or call the method that \
returns a value as needed. There is a problem though, when Objective-C sees that \
we have implemented a method (like in our case), it will not use any of its default \
implementations, and instead rely on ours.</div> <div><br></div><div> And I am \
not 100% sure that I got all of the DefaultValue arguments right, so for now the \
sample keeps using in the major places the Delegates. I only used events in a \
couple of places.<br><br><div class="gmail_quote"> On Thu, Dec 30, 2010 at 11:40 PM, \
Oleg Zee <span dir="ltr"><<a \
href="mailto:olegzzzz@gmail.com">olegzzzz@gmail.com</a>></span> \
wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px \
#ccc solid;padding-left:1ex;"> <div style="word-wrap:break-word">I see how it works \
now and thank you for updated NSTableView bindings which make use of table views \
pretty straightforward.<div><br></div><div><font \
color="#888888">Oleg.</font><div><div> </div><div \
class="h5"><br><div><br><div><div><br><blockquote type="cite">Thanks for the updated \
code!<div><br></div><div>I made a handful of extra updates to the code to make it a \
little shorter.</div><div><br></div><div> Miguel<br><br><div class="gmail_quote">On \
Thu, Dec 30, 2010 at 4:56 PM, Oleg Zee <span dir="ltr"><<a \
href="mailto:olegzzzz@gmail.com" target="_blank">olegzzzz@gmail.com</a>></span> \
wrote:<br> <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px \
#ccc solid;padding-left:1ex"><div \
style="word-wrap:break-word"><div><div>Miguel,</div><div><br></div><div>here's \
the patch to previous one. Sorry, cant provide combined patch (it might take another \
couple days to read another book on git :)).</div>
<div>I simply replaced Dictionary with Villain POCO which saved not too much code \
while readability is much better \
now.</div><div><br></div><div></div></div></div><br><div \
style="word-wrap:break-word"><div><div></div><div>
<br></div><div>Thanks,</div><div>Oleg.</div><br><blockquote type="cite">Hello \
Oleg,<div><br></div><div> Thanks for contributing this sample. \
</div><div><br></div><div> One question: is there a reason to use a \
Dictionary<string,NSObject> as the data storage instead of a strongly typed \
Villain data structure?</div>
<div><br></div><div> It just seems like there is a lot of typecasting going on in \
the code, and I would like to showcase the benefits of using C#. Could you redo the \
sample to use a Villain data type that is used instead of a Dictionary?</div>
<div><br></div><div>Miguel<br><br><div class="gmail_quote">On Tue, Dec 28, 2010 at \
3:16 PM, Oleg Zaimkin <span dir="ltr"><<a href="mailto:olegzzzz@gmail.com" \
target="_blank">olegzzzz@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex"> Yet another sample demonstrating plain Cocoa API (no data \
binding), NSTableView, implementing delegates etc.<div>Based on chapter 4 and 5 from \
"Learn Cocoa on the Mac".</div><div><br></div><div>Thanks, Oleg.</div>
<br>_______________________________________________<br>
Mono-osx mailing list<br>
<a href="mailto:Mono-osx@lists.ximian.com" \
target="_blank">Mono-osx@lists.ximian.com</a><br> <a \
href="http://lists.ximian.com/mailman/listinfo/mono-osx" \
target="_blank">http://lists.ximian.com/mailman/listinfo/mono-osx</a><br> \
<br></blockquote></div><br></div> \
</blockquote></div><br></div><br>_______________________________________________<br> \
Mono-osx mailing list<br> <a href="mailto:Mono-osx@lists.ximian.com" \
target="_blank">Mono-osx@lists.ximian.com</a><br> <a \
href="http://lists.ximian.com/mailman/listinfo/mono-osx" \
target="_blank">http://lists.ximian.com/mailman/listinfo/mono-osx</a><br> \
<br></blockquote></div><br></div> \
</blockquote></div><br></div></div></div></div></div></div></blockquote></div><br></div>
_______________________________________________
Mono-osx mailing list
Mono-osx@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-osx
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic