• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Program structure
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Program structure


  • Subject: Program structure
  • From: Paul Harvey <email@hidden>
  • Date: Thu, 2 Jun 2005 14:29:08 +0100

<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



 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Program structure
      • From: Joe Osborn <email@hidden>
  • Prev by Date: Re: NSLayoutManager looping with custom NSTextContainer
  • Next by Date: NSUserDefaultsController question
  • Previous by thread: Re: NSLayoutManager looping with custom NSTextContainer
  • Next by thread: Re: Program structure
  • Index(es):
    • Date
    • Thread