FROM : Philip Lee Bridson
DATE : Sun Jun 15 23:25:49 2008
Actually no I didn't. Now it works fine, in my frustration that was
something I hadn't even considered that I get wrong. Thanks for the
reply.
Phil.
On 15 Jun 2008, at 22:16, Ken Thomases wrote:
> On Jun 15, 2008, at 3:59 PM, Philip Lee Bridson wrote:
>
>> -(void)applicationDidFinishLaunching:(NSNotification *)notification
>> {
>> printf("In Delegate method.\n"); //DEBUG
>>
>> winCtrl = [[NSWindowController alloc]
>> initWithWindowNibName:@"Window"];
>>
>> [winCtrl showWindow:self]; //I have also tried [winCtrl
>> showWindow:[winCtrl window]];
>> }
>>
>> I have no idea why this does not work, the DEBUG info is printed
>> to stdout and the rest of the code I use all the time so I am
>> honestly none the wiser. I believe the delegate method works
>> otherwise the text would not be printed to stdout but my second
>> window will not display like it is supposed to. I am at a loss.
>
> In the nib, did you connect the "window" outlet of File's Owner to
> the primary window of the nib? The NSWindowController needs to be
> informed in this way as to which window it's supposed to control.
>
> You can try logging the "winCtrl" object you get, too, just to make
> sure it isn't nil for some reason.
>
> Cheers,
> Ken
>
DATE : Sun Jun 15 23:25:49 2008
Actually no I didn't. Now it works fine, in my frustration that was
something I hadn't even considered that I get wrong. Thanks for the
reply.
Phil.
On 15 Jun 2008, at 22:16, Ken Thomases wrote:
> On Jun 15, 2008, at 3:59 PM, Philip Lee Bridson wrote:
>
>> -(void)applicationDidFinishLaunching:(NSNotification *)notification
>> {
>> printf("In Delegate method.\n"); //DEBUG
>>
>> winCtrl = [[NSWindowController alloc]
>> initWithWindowNibName:@"Window"];
>>
>> [winCtrl showWindow:self]; //I have also tried [winCtrl
>> showWindow:[winCtrl window]];
>> }
>>
>> I have no idea why this does not work, the DEBUG info is printed
>> to stdout and the rest of the code I use all the time so I am
>> honestly none the wiser. I believe the delegate method works
>> otherwise the text would not be printed to stdout but my second
>> window will not display like it is supposed to. I am at a loss.
>
> In the nib, did you connect the "window" outlet of File's Owner to
> the primary window of the nib? The NSWindowController needs to be
> informed in this way as to which window it's supposed to control.
>
> You can try logging the "winCtrl" object you get, too, just to make
> sure it isn't nil for some reason.
>
> Cheers,
> Ken
>
| Related mails | Author | Date |
|---|---|---|
| Philip Lee Bridson | Jun 15, 19:09 | |
| Stephen J. Butler | Jun 15, 20:29 | |
| Marcel Weiher | Jun 15, 20:31 | |
| Philip Lee Bridson | Jun 15, 22:59 | |
| Ken Thomases | Jun 15, 23:16 | |
| Philip Lee Bridson | Jun 15, 23:25 |






Cocoa mail archive

