Help programming Cocoa app needed

DonkeyMe

Registered
I have created an application interface with Interface Builder, the complete project is added as a download link.

This program is meant for writing into an ASCII formatted CSV file appending text.

Now this is where I'm stuck: The interface looks ok, but I have no more knowledge of the Xcode bit than a monkey has of brain surgery.

Could someone give me a short explanation for what to do with:

1 the first entry field Add E-mail address:
I presume I must create a custom NSTextField for field 1 and what steps to take from there to make it write the content fo the text field using the button next to it (1a).

2 the second entry field for deletion of a complete string, same question.

2. how to implement a search function by using 3 and 3a?

4. by clicking button 4 replace content by default taken from another text file.


Below you find an explanation according to the numbers used in the pdf file included in the archive for download.

When using 1+1a a string of text must be added to the bottom of the file with a prefix+value from field 1.

Example:
Prefix: "newsletter"+","+"year format YYYY"+","
Value from field 1: "johndoe\@noname.com"

The string then would look like:
"newsletter","2007","johndoe\@noname.com" (with a return to the next line)

The first two values in the string may be hardcoded, It will not be necessary to create a dynamically generated Year value.
If a specific E-mail address has allready has been added to the file, it should produce a dialogue box stating" "This E-mail address has allready been added to the database" + OK button.
The second function, 2+2a, is for deleting an E-mail address from the file. If not present, a dialogue box should appear: "The E-mail address could not be found in the database" + OK button.
The third function is search. If found in the file a dialogue box should appear with:
Results:
[list of addresses found] + OK button.
or:
"The E-mail address could not be found in the database" + OK button

The fourth option (button 4) should give a warning dialogue box with: "Are you sure you want to reset the database and delete all E-mail addresses added?" + OK button + Cancel button.
If OK the content of a specific ASCII text file should be taken and the content of the CSV file should be replaced with that content.

Both files are in /etc since it will be used for a localhost website and the CSV file therefore needs Administrator write permission in order to gain control over the content of the file.

Is anybody kindly willing to give me a little help starting off as a make shift programmer for my own localhost webserver based App + PHP software please? The software will not and never will be used for commercial purposes but that doesn't mean the person who helps me out will not be permitted to do so.

Project Files Download:
http://www.sharebigfile.com/file/196769/Mailing-List-Manager-Project-Files-zip.html
 
Perhaps a talented Xcode Programmer who can give me an estimate for the costs creating it for me? I'm kinda stuck over here and Swampyland isn't exactly swamped with Xcoders you know.--> Please? <--
 
I'm not entirely sure where you're stuck, so excuse me if my advice is a little off base. My impression is that you have no idea how to get your interface elements to actually do anything. This is a common problem with new Cocoa developers, because Apple has made no effort to make their developer tools intuitive!

This has been explained many times, so instead of rehashing it I'll just point you to some useful pages on CocoaDev:

How To Link A Button To An Action Method
How To Make An Action Method


If you need help reading/writing the files, you might be able to use some Cocoa classes like NSData, or you might be better off doing things "the C way", and using the open(), lseek(), read() and write() functions. File manipulation isn't the easiest thing in Cocoa, unfortunately.
 
Thanks ever so much for the links to cocoadev.com, that is most helpful and will certainly get me on my way. I'll allso look into 'the C way' however. I feel so small, my last certificate was for Pascal MT so I reckon I'm a li'll oldskool now.
 
Hi,

It is fairly easy to read and write data from/to files with cocoa (we are talking a few lines of code). If you think this will be useful let me know and I'll show you.

Dan
 
Hello boyfarrell,

Yes please, that would be neat, so I can just look at the syntaxis and see how it works. Can you show me how to open the file in /etc append a line to the eof and close it please? And if the file is altered by the ap, does it still need Administrator authorization?

@ Anyone who responded: you folks are great help, I feel like having to learn to ride the pushbike all over again so any help is really really welcome. Thanks again.
 
Back
Top