Re: Accessing method from another class
Re: Accessing method from another class
- Subject: Re: Accessing method from another class
- From: Steve Christensen <email@hidden>
- Date: Thu, 20 Aug 2009 13:11:01 -0700
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