• 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: Could not connect the action to target of class
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Could not connect the action to target of class


  • Subject: Re: Could not connect the action to target of class
  • From: James McConnell <email@hidden>
  • Date: Thu, 10 Mar 2005 19:31:49 -0600

On 3/10/05 7:14 PM, "Hamish Allan" <email@hidden> wrote:

> Hi,
>
> I'm writing a document-based application, partly by cutting and pasting
> from a previous app I've written which works. When I try to open a
> document I get several messages of the form:
>
> Could not connect the action someAction1InMyController: to target of
> class MyDocument
> Could not connect the action someAction2InMyController: to target of
> class MyDocument
>
> I've read MyController.h into the NIB, I've set the custom class of
> File's Owner to MyController, and when I've used Interface Builder to
> connect actions (e.g., by ctrl-dragging a button to the File's Owner
> icon) under 'Target/Action' it lists 'Actions in MyController' as being
> 'someAction1InMyController:', 'someAction2InMyController:' etc.
>
> Why is Cocoa at runtime trying to connect those actions to MyDocument
> rather than MyController?
>
> Thanks,
> Hamish
>
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Cocoa-dev mailing list      (email@hidden)
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden

Because File's Owner's Custom Class is usually MyDocument in a doc-based app
by default.  Chances are it's not liking the fact that you've "reassigned"
File's Owner.

Why not just put the actions in MyDocument instead of your controller?  Just
curious is all.

James

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Could not connect the action to target of class
      • From: Sherm Pendley <email@hidden>
    • Re: Could not connect the action to target of class
      • From: Hamish Allan <email@hidden>
References: 
 >Could not connect the action to target of class (From: Hamish Allan <email@hidden>)

  • Prev by Date: Re: Could not connect the action to target of class
  • Next by Date: Re: NSNotificationCenter does the doc lie to us ??
  • Previous by thread: Re: Could not connect the action to target of class
  • Next by thread: Re: Could not connect the action to target of class
  • Index(es):
    • Date
    • Thread