Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

ucool

macrumors newbie
Original poster
May 17, 2007
5
0
In fact, i found in definition it is as:
...
{
float rotation;
}
- (void) setRotation: (float) r;
- (float) rotation;
...

And in Inteface Builder it bind the NSSlider to rotation

Usually in order to connect NSSlider and setRotation, I set
-(IBAction) setRotation: (float) r; and then connect NSSlider and setRotation in Inteface Builder

But in this sample, it does not do like this usual way. I think they configure something in Inteface Builder, but i dont know how.
 

ucool

macrumors newbie
Original poster
May 17, 2007
5
0
Thank you for your post. I knew now. It is a naming thing. I mean in my code, I have
float abc;
so I need
-(void ) setAbc: (float) a;

it is setAbc but setabc

I hate this in mac programming at this point. a typo can waste my a day.

Thank you again.
 

kainjow

Moderator emeritus
Jun 15, 2000
7,958
7
Personally I don't like bindings, and that is just one of the reasons.

NSUserDefaultsController is the only part of bindings I use normally.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.