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: Hamish Allan <email@hidden>
- Date: Fri, 11 Mar 2005 20:38:24 +0000
Thank you, but I'm still somewhat confused as to what I should be
doing. I've changed back the custom class of my File's Owner to my
Document class, added a new IBOutlet myWindowController to that class,
instantiated my Controller object in IB, and connected the instantiated
Controller to the File's Owner's (i.e., my Document class's)
myWindowController variable. However, when it comes to time to
makeWindowControllers (i.e., when I try to open a document) the
variable myWindowController is still (null).
Ironically, I somehow managed (without knowing how) to get it to work
with the File's Owner custom class being the Controller class and the
Document's makeWindowControllers instantiating a Controller
programmatically, but with all the outlets and actions connected to the
File's Owner still propagating through somehow to the instantiated
Controller. Obviously that was all wrong and probably very fragile, but
now I've tried again to do it properly, it's broken again!
Best wishes,
Hamish
On Mar 11, 2005, at 17:01, Sherm Pendley wrote:
On Mar 10, 2005, at 8:31 PM, James McConnell wrote:
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.
Not so much that it doesn't like it - it just ignores it. Defining the
type of File's Owner in IB is only for advisory purposes, so that IB
knows what outlets and actions to let you connect to.
The *real* file's owner is specified as an argument when the Nib is
loaded with the +loadNibNamed:owner: (or similar) method. That object
is what it is, regardless of what you told IB it was going to be. So
in a document-based app, it's always your document class, even if
you've told IB it was going to be something else.
sherm--
_______________________________________________
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