Showing posts with label iphone. Show all posts
Showing posts with label iphone. Show all posts

Saturday, October 3, 2009

How to fix MonoDevelop code completion problem?

At the time of this post, there is a known issue with MonoDevelop's Code Completions feature. At some point, code completion stops working and you get "Gathering class information..." in the code completion drop down list.

Before you apply this workaround, ensure that you have the latest build of MonoDevelop.

Workaround: Manually clear the code completion cache

On a Mac:

  • Close MonoDevelop
  • Open the Terminal application
  • Run this command: rm -r ~/.config/MonoDevelop/CodeCompletionData
  • Restart MonoDevelop
Note: For some reason, it did not work on my first attempt. MonoDevelop was still "Gathering class information", I listed the content of the CodeCompletionData folder and no files would appear. I did the same procedure again and it worked. So you might have to do this more than once.

I hope this helps.

Thanks to @mikebluestein and @mikrueger on twitter for their help.

Tuesday, September 29, 2009

iPhone programming in C# with MonoTouch

Two weeks ago Novell released MonoTouch (www.monotouch.net), a SDK to develop in .Net for the iPhone.

I started programming with MonoTouch two days ago. So far I must say I'm impressed. I had absolutely no experience on a Mac before.


Here is a summary of the experience with MonoTouch:

- You need a Mac on which you install:

  • iPhone SDK from Apple (iPhone Library and Interface Builder)
  • Mono Framework
  • MonoDevelop IDE
  • MonoTouch SDK

- You create user interfaces using Interface Builder, the standard User Interface designer program for Mac/iPhone apps that is part of the SDK.


- You code your logic in C# using an IDE called MonoDevelop which is somewhat similar to Visual Studio and includes code completion. You have access to the C# 3.0 (LINQ, Lambda, Generics) features, Garbage Collection (not offered in the native iPhone SDK) and most general purpose .net APIs. They have wrapped a large portion of the iPhone SDK with a C# friendly API style.


Overall, the experience is quite good. There is one important issue though; there is no debugger (no breakpoints, no watch window, no call stack). You must debug using Console.WriteLine(). I hope Novell will find a way to debug in an upcoming release.


-Sly