• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Accessing method from another class
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Accessing method from another class
      • From: "Eric E. Dolecki" <email@hidden>
    • Re: Accessing method from another class
      • From: PCWiz <email@hidden>
References: 
 >Accessing method from another class (From: PCWiz <email@hidden>)

  • Prev by Date: Re: Force crash a cocoa app for Crash Reporter testing
  • Next by Date: Re: When do I need to override hash?
  • Previous by thread: Accessing method from another class
  • Next by thread: Re: Accessing method from another class
  • Index(es):
    • Date
    • Thread