• 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
IB key-value oddity...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

IB key-value oddity...


  • Subject: IB key-value oddity...
  • From: Fritz Anderson <email@hidden>
  • Date: Wed, 13 Jun 2001 01:20:41 -0500

So I'm experimenting with a Cocoafied version of the Jeff Molofee OpenGL tutorial <URL:http://hene.gameworks.com/>, making the pyramid spin, and I think to myself it would be a good thing to have a slider to set the spin rate. I make a 1-to-10 NSSlider, and next to it I put an NSTextField to display the current float value of the slider. I have a controller object, which we'll just call Controller.

The controller's outlets and actions are as follows

Controller {
pyramidRate --> NSTextField
pyramidSlider --> NSSlider
-[setPyramidRate:] <-- NSSlider
}

I discover I have a namespace collision: When the nib loads, setPyramidRate: gets called with an NSTextField * in the sender parameter. After awakening from the nib, the pyramidRate outlet is nil.

Renaming the action to newPyramidRate: fixes the problem.

I'm guessing I walked into a trap with the NSKeyValueCoding protocol, but darned if I remember being warned of it. Could someone put me out of my misery and point out where this is documented? Obviously this is in a document I want to re-read.

This is IB 2.0.1 and PB 1.0.1.

-- F


  • Follow-Ups:
    • Re: IB key-value oddity...
      • From: Henri Lamiraux <email@hidden>
  • Prev by Date: Re: Apple's Reluctance about Customization of MacOS X
  • Next by Date: Re: WWDC Developer Tools Online - question
  • Previous by thread: Re: WWDC Developer Tools Online - question
  • Next by thread: Re: IB key-value oddity...
  • Index(es):
    • Date
    • Thread