# Sunday, July 04, 2010

It took me quite a bit of battling tonight, and some of it turned out to be an OS caching issue but I managed to set the application icon for my test MonoMac app.

Take your favorite image and convert it to a .icns file, I used the http://iconverticons.com/ website. Drop the output of that into the root of your MonoDevelop project. Next, right click on the file and set the “Build Action” to content.

Double click on “Info.plist” in the root of your project, add a new item and set its key to “Icon File”, and value to “icon” or what ever you named your icon file. Note, you do not need to put the .icns extension in the value field to make things work.

image

Sunday, July 04, 2010 8:00:00 AM (Alaskan Daylight Time, UTC-08:00)
# Saturday, July 03, 2010

I’ve followed MonoDevelop for a long time. In that time, I’ve seen it go from a barely usable product, to now a fairly capable IDE. Out of the box, it look and acts much like Visual Studio. I do like that that a dedicated unit testing tab is present as a constant reminder that, “Hey, you know you should probably write those unit tests you’ve always talked about writing.”

One thing I was somewhat surprised to not see, at least on the Mac edition of MonoDevelop is a built-in scheme for the VS keybindings. On the down side, I have been able to crash MonoDevelop when I didn’t have some setup code in the right place and I ended up with a null ref trying to talk to some Cocoa widgets.

More to come as I spend more time with MonoDevelop.

.NET | Mono | MonoMac
Saturday, July 03, 2010 8:00:00 AM (Alaskan Daylight Time, UTC-08:00)
# Friday, July 02, 2010

When Miguel De Icaza first announced MonoMac back in April I was pretty excited! Its been my goal for the past two years to write a half-decent, native looking, Mac OSX application with .NET. I’ve looked at the various Cocoa binding strategies for Mono and always found them lacking. Some like CocoaSharp haven’t been updated in ages, and the WinForms stuff on Mac looked plain fugly. Like Windows 95 fugly.

I found Michael Hutchinson’s quick-start post on writing a simple .NET app using MonoMac. Because I had previous experience using Interface Builder, I was able to muddle my way through building his simple app. But at the end, I wanted something more. “Hello World” is great to show you the most basic syntax of a language, and maybe how to use the compiler, but it honestly does nothing for me.

So, I set out to write real, although somewhat contrived image viewing application. Having an extensive background writing WinForms, ASP.NET and some WPF apps, the hardest part for me was trying to figure out the Cocoa equivalent to things like PictureBox, and FolderBrowserDialog. But Google as always was my friend.

I’m not going to dive into how to write the app tonight, but I will post a screen shot, and the ImageViewer source!
image

Nits

Yes Cocoa is based on an MVC architecture, and yes I should have put some of the code into a business class, but I didn’t.

.NET | C# | Mac OS X | Mono | MonoMac
Friday, July 02, 2010 7:22:00 AM (Alaskan Daylight Time, UTC-08:00)