Re: Accessing method from another class
Re: Accessing method from another class
- Subject: Re: Accessing method from another class
- From: PCWiz <email@hidden>
- Date: Thu, 20 Aug 2009 14:43:59 -0600
Sorry, it has no colon, just updateText. And I get no build warnings
or errors at all.
Thanks
On 2009-08-20, at 2:11 PM, Steve Christensen wrote:
If your logging code is displaying a message on entry to
resetTextAndBar:, but nothing after that, it sounds like you're
taking an exception. In your code snippet below, you're calling
[self updateText], but in the last sentence of your problem
description, you mention a method called updateText: (with trailing
colon). Which is it?
You might check any warnings you're receiving during compilation
because, at least for me, if I accidentally reference a method
that's not part of the specified class, I get a "class foo may not
respond to method bar" sort of warning.
steve
On Aug 20, 2009, at 12:18 PM, PCWiz wrote:
This is going to seem like a complete newbie question, but I can't
get this to work. I have a class with a method called
"resetTextAndBar:" which just basically resets some text and a
progress bar to match up with new data inserted into the table view:
- (void)resetTextAndBar:(id)sender {
[self updateText];
[bar setNeedsDisplay:YES];
}
I need to call this method from a separate class.
I've tried using #import and forward class (@class), and using
NSLog I determined that the method IS being called, but the 2
methods (updateText: and setNeedsDisplay:) arent being called
_______________________________________________
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:
This email sent to email@hidden