[Mono-osx] Another monomac example - incomplete

kjpou1 kjpou at pt.lu
Wed Nov 10 01:45:20 EST 2010

Hello Gareth

Hope I can help here.

Baker, GJ (Gareth) wrote:
> Its incomplete because I cant get NSDictionary.FromFile to work...

Try this below:

NSDictionary dictFromFileVariable = new NSDictionary(filePath);

When you create a new NSDictionary object one of the constructors takes a
file path string which maps to "initWithContentsOfFile"

I have not had a chance to work with the NSDictionary object in this fashion
yet so if that does not work one of the experts will have to step in.

> also when you create the application you have to manually move the
> Contacts.plist file into the Resources folder (is there a way to get
> MonoDevelop to do this?).

Add the Contacts.plist file to your project and once you have it added you
can change the properties of the object.  What you are looking for is the
Build Action, once you find it make sure it is set to "Content".

Another way is to right click the Contacts.plist within the project and in
the popup menu look for Build Action from there in the submenu you can find
the item labeled Content.  Just click it.

What you might want to do is clean the build, Shift+Cmd+K, and then
recompile to get a clean directory.  Probably not necessary but is something
I do out of habit from old Visual Studio days.

Hope this helps


View this message in context: http://mono.1490590.n4.nabble.com/Another-monomac-example-incomplete-tp3035103p3035568.html
Sent from the Mono - OSX mailing list archive at Nabble.com.

More information about the Mono-osx mailing list