Re: Several Cocoa questions
Re: Several Cocoa questions
- Subject: Re: Several Cocoa questions
- From: Andrew Pinski <email@hidden>
- Date: Wed, 27 Feb 2002 13:37:17 -0500
On Wednesday, February 27, 2002, at 01:19 , Chad Armstrong wrote:
Hello,
I'm fairly new to Cocoa development, and I have several questions which
I hope can make my small application I'm working on, run a little
smoother.
1) Closing the app from a button - If there is an Off or Close button
in the program window, what code is necessary to tell the program to
shut down? In Java, this would be fairly simple with a command like:
System.exit(0);
exit(0); like in C
Hint there is no clean up you should instead do [[NSApplication
sharedApplication] terminate:self];
But I am using just Objective-C Cocoa, no Java.
2) How can I create multiple instances/windows of my program? Do I
just create a function which allocates a new instance of the program
and that handles most of the problems?
3) When the last window of the program is closed, what code is
necessary to tell the entire program to shut down? Also, how would I
link in this information to my interface, if necessary?
Thanks for any help.
Chad Armstrong
email@hidden
_______________________________________________
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.