Multiple Window Application...
Multiple Window Application...
- Subject: Multiple Window Application...
- From: James McConnell <email@hidden>
- Date: Sat, 04 Oct 2003 19:23:03 -0500
First off, I know I've asked this before, but I got sidetracked on the
project, I didn't save the answers I did get (shame on me) and I can't find
them in the archives. So, basically, all I would like to know is how to
manage multiple windows in Cocoa/Objective-C.
Just so you all know where I'm coming from, I'm originally a Java developer,
and I plain got sick of having to struggle to come up with nice looking
interfaces, so I'm looking at Cocoa, and yes, I will stick with Objective-C,
not Cocoa/Java.
I know exactly how to do this in Java, so let me quick explain how I would
do something like this in Java, so I can find out what is comparable in
Obj-C. In Java, I can create a .java source file that extends Jframe, place
all my components (buttons, text fields, etc) as well as their associated
actions. When I want to display the frame, I instantiate an object of it:
MyFrame frame = new MyFrame(); // MyFrame extends Jframe
Frame.show();
When I want to get rid of it, I either call frame.hide() (if I still need it
later) or call frame.dispose() (if I no longer need it).
Now, in Cocoa, all the examples I've seen involve small projects with only
one window. You create it in IB, create a controller class that contains
all the outlets and actions. How would I handle more than one window?
Should I have multiple windows in one .nib file, or should I create separate
.nib files for each window I want? In Java, I simply create the "window" by
itself by sub-classing Jframe, and instantiate, hide, and dispose as needed.
It's fairly simple. How do I emulate that in Cocoa? I hope I haven't
confused anyone, and I'm not looking for complete answers either. If you
could just point me to something in the Foundation or Application kits and
explain what I should be looking for, I can probably figure the rest out on
my own (that's what I prefer to do, but when coming to a new framework, I
sometimes need a push in the right direction.).
Hope I've explained it better this time. Sorry for posting this again, but
I got sidetracked and was never able to save my original responses. Thanks
for any and all info.
James
_______________________________________________
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.