Re: Writing apps without IB...
Re: Writing apps without IB...
- Subject: Re: Writing apps without IB...
- From: Vince DeMarco <email@hidden>
- Date: Wed, 27 Nov 2002 20:39:25 -0800
The easier way of doing this is in PB.go to the Targets tab, select you
applications target, switch to Info.plist Entries, in the Cocoa
Specific section there is a Principle class section: Add AppController
there.
if you still want to do the stuff below, look at the documentation of
NSApplicationMain() in the documentation is describes what you need to
do if you choose not to use NSApplicationMain()
vince
On Wednesday, November 27, 2002, at 08:10 PM, Matthew Smith wrote:
Hi.. I was wondering if someone could point me in the right direction
for
writing a sample cocoa program that has a minimal UI but isn't built
using IB
at all -- all UI setup is done via code and not resource files. I
haven't
found much info on this and something minimal would get me going.
One way to do this is to create a subslassed NSApp (mine's called
AppController) then have this code in your main.m
#import "AppController.h"
int main(int argc, const char *argv[])
{
NSApp = [AppController sharedApplication];
[NSApp run];
return 0;
}
In AppController.m, have a function called: -(void)finishLaunching
In which you can start the ball rolling (creating windows and what-not)
Hope it helps
Matt Smith
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.