Creating new instances of a window?
Creating new instances of a window?
- Subject: Creating new instances of a window?
- From: Victor Ng <email@hidden>
- Date: Sun, 10 Nov 2002 03:16:07 -0500
It is not clear to me how I should be creating 'new' instances of a
window when I click a button in Cocoa.
I want to be able to create a new FooController and the associated
FooWindow which is in a NIB file whenever I invoke method in
AppController called createNewFoo.
My problem is that the examples I have read in the Hillegass book and
in the Vermont recipes usually involves an NSDocument. This isn't what
I really want since the contents of the view aren't going to be saved
as a file back to the filesystem. I want to later post the data back
to the main class through the NSNotificationCenter.
The other examples of creating 'new' windows involve loading NIBs
programatically, but in these examples, the window is a singleton.
There is usually an AppController with an instance of FooController -
so I can only ever have a single FooWindow instance.
I've tried pulling out the FooController from AppController and
instantiating a new FooController on every invocation of
"createNewFoo", but this seems to give me a sig11 fault.
Ideas? Better yet - can someone point me to working code? Sorry if
this is a little confusing - I'm still a Cocoa newbie.
thanks,
vic
btw - on a totally different note - it's amazing to me how friendly the
Cocoa community is compared to the Java community. I don't think
anyone has ever answered any of my Java questions on the mailing lists
in the last 2 years.
---
Be bold and mighty unseen forces come to your aid.
_______________________________________________
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.