• 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: Newbie - inter object method invocation
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Newbie - inter object method invocation


  • Subject: Re: Newbie - inter object method invocation
  • From: Jeff LaMarche <email@hidden>
  • Date: Thu, 20 Jun 2002 14:36:57 -0700 (PDT)

On Thursday, 20, 2002, at 02:24PM, <email@hidden> wrote:

>Then I get the following build warning, and the invocation doesn't take place:
>
>warning: cannot find class (factory) method.
>warning: return type for 'beepForMe' defaults to id
>
>Why doesn't this work? Is it because I have to target an excisting object that has already been instantiated (in contrast to currency converter's converter object? In that case should I use a different way to invoke the method? I know I can probaly use notifications, is this the supposed way of implementing interobject method invocations? Again, all remarks are surely welcome!

You are calling an instance method on a class object. You need to either declare the method as a class method (use + instead of -), or instantiate an object before sending it a message, depending on which is appropriate to your situation.

Jeff
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Prev by Date: controlling scrollbar position
  • Next by Date: Re: Newbie - inter object method invocation
  • Previous by thread: controlling scrollbar position
  • Next by thread: Re: Newbie - inter object method invocation
  • Index(es):
    • Date
    • Thread