Re: Unable to access customized NSView's accessor method
Re: Unable to access customized NSView's accessor method
- Subject: Re: Unable to access customized NSView's accessor method
- From: Andy Lee <email@hidden>
- Date: Sat, 4 Mar 2006 16:40:27 -0500
On Mar 4, 2006, at 4:25 PM, Frederick C. Lee wrote:
I had thought that this customized NSView would have been allocated
via IB.
When I initially ran the program, the customized NSView DID
initialize:
[...]
So my revised question: why is it nil and how can I call its accessor?
The view was instantiated but I'm guessing you didn't make a
connection to it from your AppDelegate object. The fact that you've
created an object in IB does not tell it what other objects need to
connect to it. When the nib file is loaded, all the objects you
created get instantiated, which explains why your -initWithFrame:
method gets called. But connections *between* objects are only made
if you specify them.
In IB, Control-drag from the AppDelegate instance to your custom view
instance. In the resulting Inspector window, double-click the
ewMainMapView instance variable to make the connection. Save the nib
file and rebuild your project.
--Andy
_______________________________________________
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