• 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
where does cocoa start up a program?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

where does cocoa start up a program?


  • Subject: where does cocoa start up a program?
  • From: N!K <email@hidden>
  • Date: Fri, 3 Nov 2006 19:25:12 -0800

This is certainly an elementary question from a gross beginner, but I'm confused between the object oriented model (Objective C) and the procedural model (C). I couldn't find an answer in Xcode or Cocoa documentation.

In C, the program runs from the first line of code onward.

In Objective C/Cocoa, you write methods in any order and they are executed in response to events. Events come from the interface, which appears magically and the user interacts with.

What if I want some C code to run once at the start of the program, not as part of a method whenever (if ever) it is invoked?
I was advised not to stick it into main.m because Xcode generates that and ties it into wherever it's supposed to go.
Where else could it be placed, using Xcode?


Nick
_______________________________________________
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: where does cocoa start up a program?
      • From: Brian Stern <email@hidden>
    • Re: where does cocoa start up a program?
      • From: Scott Stevenson <email@hidden>
    • Re: where does cocoa start up a program?
      • From: Nick Zitzmann <email@hidden>
  • Prev by Date: Re: No selectedObjects After Insert:
  • Next by Date: Re: where does cocoa start up a program?
  • Previous by thread: Re: double forwarding problem
  • Next by thread: Re: where does cocoa start up a program?
  • Index(es):
    • Date
    • Thread