I asked a question yesterday about a little app that I would like to make for OSX with Cocoa/Obj-C (Xcode).
The princip is easy:
Got an XML file like this one:
<?xml version="1.0" ?>
<Report>
<Date>20110311</Date>
<Title>The Title</Title>
<Description>Description sample<Description>
</Report>
When the app is opened, there is a window with three text fields.
When a file is loaded (File -> Open) the three text fields get the value of what is in the XML elements.
For my example it will be:
TextFields 1 => 20110311
TextFields 2 => The Title
TextFields 3 => Description sample
And that’s it!
As you can see in my description, it’s maybe easy…
But I tried a lot of things, I didn’t successed :/
I’m a newbie in Cocoa developpment and there’s a lot of dedicated things that I don’t understand like how can I make links between CODE & GUI…
Now here is my demand:
If someone could make me an Xcode project similar to my example above, for see what’s wrong with my different trys, or explain me how this app can be done (with codes examples)…
I’ve spend 4 long days on that project but didn’t have results 🙁
Help… 🙁
Miskia
Sample project:
http://dd5.org/static/XML.zip
How to create a project like above:
– Create new project
– Add code to the header (.h) and implementation (.m) files
– Design the main window
– Finally add the correct bindings
See images below how to add the bindings (already done in the sample project).
Right-click on the App Delegate drag to the NSTextFied (Picture 1).
Release the button and select the correct entry in the ray menu (Picture 2).