FROM : Victor Ng
DATE : Sun Nov 10 21:23:21 2002
Thanks!
I'm not sure what I was doing last night, but my windows are popping up
normally now.
The only problem I have left is that on closing, the window is not
releasing the controller for that window.
I'll try reworking my program to use NSDocument and
NSDocumentController instead to see how it works out.
thanks again,
vic
On Sunday, November 10, 2002, at 02:33 PM, Ondra Cada wrote:
>
> On Sunday, November 10, 2002, at 09:16 , Victor Ng wrote:
>
>> It is not clear to me how I should be creating 'new' instances of a
>> window when I click a button in Cocoa.
>
> Normally, by reading in a NIB containing the window.
>
> Alternatively you can create a window programmatically by [[NSWindow
> alloc]
> initWith... (a number of arguments I don't bother to remember, they
> are to be found in NSWindow.html)]. That's a last resort though, and
> you should very very seldom need that.
>
>> 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.
>
> So just load the NIB. That's exactly what NSDocument would do, if
> involved.
>
>> 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.
>
> Even that, you still can use NSDocument. Or don't need to. The
> framework's pretty flexible.
>
>> 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.
>
> Well then there is some bug -- quite probably, you forgot to retain
> something.
>
>> 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.
>
> Well, Cocoa's good for programming. Java's good for... let's stop it
> ;)))
> ---
> Ondra Cada
> OCSoftware: <email_removed> http://www.ocs.cz
> private <email_removed> http://www.ocs.cz/oc
>
>
---
blog: http://radio.weblogs.com/0108956
email: <email_removed>
MSN: <email_removed> AIM: <email_removed>
_______________________________________________
cocoa-dev mailing list | <email_removed>
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
DATE : Sun Nov 10 21:23:21 2002
Thanks!
I'm not sure what I was doing last night, but my windows are popping up
normally now.
The only problem I have left is that on closing, the window is not
releasing the controller for that window.
I'll try reworking my program to use NSDocument and
NSDocumentController instead to see how it works out.
thanks again,
vic
On Sunday, November 10, 2002, at 02:33 PM, Ondra Cada wrote:
>
> On Sunday, November 10, 2002, at 09:16 , Victor Ng wrote:
>
>> It is not clear to me how I should be creating 'new' instances of a
>> window when I click a button in Cocoa.
>
> Normally, by reading in a NIB containing the window.
>
> Alternatively you can create a window programmatically by [[NSWindow
> alloc]
> initWith... (a number of arguments I don't bother to remember, they
> are to be found in NSWindow.html)]. That's a last resort though, and
> you should very very seldom need that.
>
>> 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.
>
> So just load the NIB. That's exactly what NSDocument would do, if
> involved.
>
>> 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.
>
> Even that, you still can use NSDocument. Or don't need to. The
> framework's pretty flexible.
>
>> 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.
>
> Well then there is some bug -- quite probably, you forgot to retain
> something.
>
>> 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.
>
> Well, Cocoa's good for programming. Java's good for... let's stop it
> ;)))
> ---
> Ondra Cada
> OCSoftware: <email_removed> http://www.ocs.cz
> private <email_removed> http://www.ocs.cz/oc
>
>
---
blog: http://radio.weblogs.com/0108956
email: <email_removed>
MSN: <email_removed> AIM: <email_removed>
_______________________________________________
cocoa-dev mailing list | <email_removed>
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
| Related mails | Author | Date |
|---|---|---|
| Victor Ng | Nov 10, 09:16 | |
| Andreas Mayer | Nov 10, 18:43 | |
| Ondra Cada | Nov 10, 20:33 | |
| Victor Ng | Nov 10, 21:23 | |
| Ondra Cada | Nov 10, 22:34 |






Cocoa mail archive

