• 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: Newbie question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Newbie question


  • Subject: Re: Newbie question
  • From: James Mooney <email@hidden>
  • Date: Thu, 13 Mar 2003 14:44:14 -0500

Roger that and understand, however....can you explain what is "blowing" out event manager communication between the slider and the NSView or the colorwell and the NSView when you do instantiate DotView in the interface builder?

Am I correct is saying that by instantiating DotView and creating outlets and actions for Dotview override and or break connections to live objects sitting in the window? That being said then when an event is generated, the path to the right object and method are directed to the incorrectly instantiated object Dotview? Because the instantiated Dotview does not have the correct methods to handle the action events and connections to the right slider, colorwell, and nsview, the event never gets handled?

That that sound right?

Jim



On Thursday, March 13, 2003, at 01:29 PM, Don Arbow wrote:

On Thursday, March 13, 2003, at 08:35 AM, James Mooney wrote:

In this example, you are not supposed to instantiate the class Dotview. When you do, the problem above occurs. When you delete the instatiaion in the interface builder, everything works fine. The slider changes the size of the shape and the colorwell works fine. It wasn't until I downloaded the complete project from the publishers website that I saw there was no little Dotview icon. I immediately saw what I was doing wrong. However, I do not understand how instantiating in the interface builder effects the operation of my project. All examples I have seen so far told you to instantiate the class and then write the classes to the project. In this case.....you are only supposed to do the later. The Dotview.h and .m files were created.

What does instantiating a class do when you tell it to be done in the interface builder? Whether you do it or not, the slider and the colorwell gets drawn. If I instantiate the Dotview class, the communication of the slider and the NSView do not work, not instantiating and they talk to each other? There is no change in the code in the .m or .h files so I assume there is some plist or xml doc the app uses where info is added or subtracted when you instruct a class to be instantiated. Anyone know the reason why? What is going on?




The reason that you do not need to instantiate the DotView is because it is already instantiated for you. If you recall when you built the window in IB, you dragged a CustomView object into the window, then set it via the Custom Class panel to DotView.

Most of the time, you'll be instantiating controller classes, which don't have a visual representation, like window widgets do. Things you drag off the palettes are visual items and are instantiated by awakeFromNib when the nib is loaded.

Don
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

References: 
 >Re: Newbie question (From: Don Arbow <email@hidden>)

  • Prev by Date: Re: Newbie question
  • Next by Date: Re: Newbie question
  • Previous by thread: Re: Newbie question
  • Next by thread: (no subject)
  • Index(es):
    • Date
    • Thread