Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: "Controller Cannot Be nil" on binding NSTextField



on 5/12/08 7:01 PM, email@hidden purportedly said:

> - (void) init
> {
> deadlineTimer = [NSTimer scheduledTimerWithTimeInterval:1.0
> target:self selector:@selector(updateTime:) userInfo:nil repeats:YES];
> self.deadlineHours = 24;
> self.startTime = [NSCalendarDate calendarDate]; //Current date
> self.endTime = [startTime dateByAddingYears:0 months:0 days:0
> hours:self.deadlineHours minutes:0 seconds:0];
> }

Init does not return void, it returns id. The init method is entirely wrong,
and this is a very fundamental issue. You need to re-read the Objective-C
guide and make sure you understand how to instantiate objects before you go
any further.

Best,

Keary Suska
Esoteritech, Inc.
"Demystifying technology for your home or business"


_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden

References: 
 >"Controller Cannot Be nil" on binding NSTextField (From: Johnny Lundy <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.