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: b a r t o n <email@hidden>
- Date: Thu, 10 Mar 2005 17:29:46 -0800
Hi Hamish,
I think it may be because you have not specified in the inspector for
the File's Owner that you want MyController to be the File's Owner.
Try clicking on the file's owner icon and bringing up the inspector
(Command-Shift-I) and then select custom class - you can then set the
Controller as the File's Owner.
This may not, however, be what you want - what you may want instead is
to instantiate your controller object to is appears in the same icon
view as the File's Owner and drag from your UI elements directly to
the controller.
Barton
On Fri, 11 Mar 2005 01:14:17 +0000, 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
>
_______________________________________________
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