[Mono-osx] ButtonMaddness new sample

Miguel de Icaza miguel at novell.com
Sat Oct 30 18:05:06 EDT 2010


Hello Pavel,

there is a new code for the ButtonMaddness sample with added
> functionality (mainly event handling). I have used code from today
> afternoon to work above it. I have added other more Cocoa API bindings
> as well, in the SRC\AppKit subfolder there are new files added:
> NSLevelIndicator.cs
> NSSegmentedControl.cs
>

Glorious!   I added the new APIs, and the new sample.

I did a few touch ups to your code, in particular, I removed the use of @""
for strings, as this is needed in Objective-C, but not in MonoMac (they have
different purposes in Objective-C and MonoMac, so I do not want to get users
confused).

The other bit is that I took advantage of C# 3's constructor initializers to
simplify the construction of objects, as well as the Activated method to
hook up a delegate instead of Target/Action patterns (but I did document the
change).

with property Cell override and NSSegmentControl has
> UnselectAllSegments() method added for easier manipulation. Btw. it is a
> really nice concept having the generated code with the g.cs as suffix
> and availability to add own partial implementation, that allows such
> tweaks, great work guys.
>

Thanks!   I love that feature!

Btw, you did check in all of your .g.cs files to source control, this will
produce a lot of noise for you if you do diffs.

Thanks for your patches, the sample is lovely!
Miguel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-osx/attachments/20101030/790c0b78/attachment.html 


More information about the Mono-osx mailing list