[Mono-osx] Another monomac example - incomplete
gareth.baker at stfc.ac.uk
gareth.baker at stfc.ac.uk
Wed Nov 10 07:24:35 EST 2010
Thanks Kenneth for the tips, I was able to start move forward with the
reading and writing of the plist and get MonoDevelop to add it to the
app bundle.
However I soon realised that I had overlooked the fact that the plist
was an array of dictionaries! So please everyone ignore the code in the
Initialize() function in my example - I've got to get my head round the
use of arrays as well and how to read and write the plist!!.
Regards
Gareth Baker
> -----Original Message-----
> From: mono-osx-bounces at lists.ximian.com [mailto:mono-osx-
> bounces at lists.ximian.com] On Behalf Of kjpou1
> Sent: 10 November 2010 06:45
> To: mono-osx at lists.ximian.com
> Subject: Re: [Mono-osx] Another monomac example - incomplete
>
>
> 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
>
> Kenneth
>
> --
> 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.
> _______________________________________________
> Mono-osx mailing list
> Mono-osx at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-osx
--
Scanned by iCritical.
More information about the Mono-osx
mailing list