where does cocoa start up a program?
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