<New Cocoa-developer alert!>
Hi all. I've been coding using REALbasic for years, and use PHP with MySQL in my daily work. I'm all fired up to dig into Cocoa and have been meaning to for a long time. Now i've started and seen some positive results, I'm eager to build on my new-found knowledge.
I'm having difficulty working out where to place code. In REALbasic, blocks of code usually sit with the relevant control. For example, the Action method of a button holds the code that would run when the button is clicked, or it would call a function that did the work.
In Cocoa, controls send messages, so the method can know who called it and ask the control/object for more info if required.
To the established Cocoa developers, how should I go about organising my source code? I can see -- if I'm not careful -- one file.m file becoming unmanageably long with all functions/methods held in it. Should I just create different .h/.m files for different parts of my application as I understand it? Or is it more likely that each window created in Interface Builder has its own .h/.m files so I should put the code in each of those?
Thanks for your help and patience.
-- Paul Harvey
Lead Programmer email@hidden
Hiddenfield Software "Creating useful software for Mac OS X" www.hiddenfield.com |