• 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: Unable to access customized NSView's accessor method
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >Unable to access customized NSView's accessor method (From: "Frederick C. Lee" <email@hidden>)

  • Prev by Date: Re: Unable to access customized NSView's accessor method
  • Next by Date: Connect NSView to NSDocument
  • Previous by thread: Unable to access customized NSView's accessor method
  • Next by thread: Unable to access customized NSView's accessor method
  • Index(es):
    • Date
    • Thread