FROM : Guy English
DATE : Wed Dec 01 20:45:54 2004
Your alloc method is likely failing and returning NULL. You're then
sending the init method nowhere. Did you implement an alloc method and
/ or can we see the class declaration?
Guy
On Wed, 1 Dec 2004 16:51:16 +0100, Michael Becker <space.<email_removed>> wrote:
> Hey!
>
> Okay, this one almost scares me! What the heck is wrong here? I have an
> NSObject subclass (PCProductsOrder) and an NSWindowController subclass
> (PCProductsOrderController). The controller wants to create an instance
> of the NSObject subclass.
> Here's the code:
>
> - (id)init {
> self = [ super initWithWindowNibName:@"ProductsOrder"];
> if (self) {
> NSLog(@"initializing");
> order = [[ PCProductsOrder alloc] init];
> NSLog(@"order: %@", order);
> }
> return self;
> }
>
> I put an NSLog into PCProductsOrder's init-method (which doesn't do
> anything special) and it's obviously never called. The output of the
> above method is the following:
>
> 2004-12-01 16:46:47.555 PhotoClient3[1008] initializing
> 2004-12-01 16:46:47.555 PhotoClient3[1008] order: (null)
>
> There are no compile-time errors or warnings, to my eyes everything
> looks alright. What could be the cause of this?
>
> Cheers,
> Michael
>
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Cocoa-dev mailing list (<email_removed>)
> Help/Unsubscribe/Update your Subscription:
> http://lists.apple.com/mailman/options/cocoa-dev/guy.<email_removed>
>
> This email sent to guy.<email_removed>
>
DATE : Wed Dec 01 20:45:54 2004
Your alloc method is likely failing and returning NULL. You're then
sending the init method nowhere. Did you implement an alloc method and
/ or can we see the class declaration?
Guy
On Wed, 1 Dec 2004 16:51:16 +0100, Michael Becker <space.<email_removed>> wrote:
> Hey!
>
> Okay, this one almost scares me! What the heck is wrong here? I have an
> NSObject subclass (PCProductsOrder) and an NSWindowController subclass
> (PCProductsOrderController). The controller wants to create an instance
> of the NSObject subclass.
> Here's the code:
>
> - (id)init {
> self = [ super initWithWindowNibName:@"ProductsOrder"];
> if (self) {
> NSLog(@"initializing");
> order = [[ PCProductsOrder alloc] init];
> NSLog(@"order: %@", order);
> }
> return self;
> }
>
> I put an NSLog into PCProductsOrder's init-method (which doesn't do
> anything special) and it's obviously never called. The output of the
> above method is the following:
>
> 2004-12-01 16:46:47.555 PhotoClient3[1008] initializing
> 2004-12-01 16:46:47.555 PhotoClient3[1008] order: (null)
>
> There are no compile-time errors or warnings, to my eyes everything
> looks alright. What could be the cause of this?
>
> Cheers,
> Michael
>
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Cocoa-dev mailing list (<email_removed>)
> Help/Unsubscribe/Update your Subscription:
> http://lists.apple.com/mailman/options/cocoa-dev/guy.<email_removed>
>
> This email sent to guy.<email_removed>
>
| Related mails | Author | Date |
|---|---|---|
| Michael Becker | Dec 1, 16:51 | |
| John Stiles | Dec 1, 20:32 | |
| Steve Bird | Dec 1, 20:36 | |
| Amul Goswamy | Dec 1, 20:43 | |
| Shawn Erickson | Dec 1, 20:44 | |
| Guy English | Dec 1, 20:45 | |
| Erik M. Buck | Dec 1, 21:26 | |
| Guy English | Dec 1, 22:11 | |
| Michael Becker | Dec 2, 16:11 |






Cocoa mail archive

