Re: Could not connect the action to target of class
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