Thank You Andy. That was the cause. Changed the location of the statement from init to awakeFromnib and its working.
On Wed, Jun 3, 2009 at 6:22 PM, Andy Lee <ag...@mac.com> wrote: > On Jun 3, 2009, at 6:25 AM, Shraddha Karwan wrote: > >> [labelStr setAttributedStringValue:[self setLabelFont:@"Checking for >> updates"]]; >> > > I suspect labelStr is nil. When are you executing this line? If labelStr > is an outlet and you are doing it in an init method, that is too early -- > labelStr has not been connected yet. Try moving this line to awakeFromNib. > > < > http://developer.apple.com/documentation/Cocoa/Reference/ApplicationKit/Protocols/NSNibAwaking_Protocol/Reference/Reference.html#//apple_ref/occ/instm/NSObject/awakeFromNib > > > > In general, when a line of code doesn't seem to be having any effect: > > * Make sure the line is actually being executed, using a breakpoint or > NSLog. > > * Make sure the receiver isn't nil, using the debugger or NSLog. > > * If the receiver is an outlet, make sure you aren't messaging it before > the outlet has been connected. > > --Andy > > > -- Regards, Shraddha Karwan _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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/archive%40mail-archive.com This email sent to arch...@mail-archive.com