Re: Can't launch a new Window at click of a button
Re: Can't launch a new Window at click of a button
- Subject: Re: Can't launch a new Window at click of a button
- From: email@hidden
- Date: Thu, 11 Dec 2008 09:00:26 -0500
I second the printed material. Search for menu implementations as a
way to get started. Also, a book like Hillegass' "Cocoa Programming
for Mac OS X Third Edition" is a good place to start.
However, for expedience's sake, here's a kick start with but one way
to open another window from a seperate nib (you will need to know how
to create a controller class, etc., for the other nib):
In your implementation header file add (near the top, under the imports):
@class MyNextWindowControllerClass;
In the same file, add in your implementation section:
MyNextWindowControllerClass *myNextWindow;
In your implementation file add (under the main imports)
#import "<MyNextWindowControllerClass.h>"
In your code that the button will call:
- (IBAction)showMyNextWindow:(id)sender
{
// myNextWindow nil?
if (!myNextWindow)
{
// create a new needle window
myNextWindow = [[MyNextWindowController alloc] init];
}
// display the window
[myNextWindow showWindow:self];
}
This may not be the absolute best way but it does work.
Do review the calls, etc., as I'm sure you'll have follow-on questions.
Peace, Love, and Light,
/s/ Jon C. Munson II
Quoting Shraddha Karwan <email@hidden>:
Thanks for the reply but I have gone through this tutorial, it doesn't talk
about advanced stuff of adding multiple windows and the nib files, file
owners etc in detail.
On Thu, Dec 11, 2008 at 6:48 PM, rajesh <email@hidden> wrote:
May be its good to follow a printed material first.
This link got basic some stuff in it,
http://developer.apple.com/documentation/cocoa/conceptual/objctutorial/01Introduction/chapter_1_section_1.html
~Rajesh
--
Regards,
Shraddha
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden