cocoa - Cannot bind NSSlider in IB? -


I have just created a new Xcode project in the AppControl class header file I have defined the following objects (and some others are also) :

  IBOutlet NSImageView * inputImageView; IBOutlet NSImageView * outputImageView; IBOutlet NSTextField * myNoiseLevel; IBotlate CGFBlot * MySprincess;  

By entering the original code in .h and .m files, I then went into the interface builder and created my UI. I was able to force two NSImageView controls in the IB with the respective NSImageView object listed above. And I was able to bind some other items / controls too, too. But I'm unable to tie the previous two items (my noselevels and myspersis) on the main window in the nsl-slider controls. I am not sure why I know that this kind of thing is difficult to diagnose, because it is not "strictly related code", but if there is something "difficult" about the compulsive sliders please tell me that the main " What are "suspicious" ones that I should check.

This is my first attempt to use slider control through IB. I have a book (Coco Programming for Mac OS X, by third edition A. Hielajus) that I am using to learn about the basic way of doing this stuff. And there's a slider example on it, but its slider example is "continuous" and it uses the key binding path. I think this is overwork for what I want - when I push the second button, I want to draw the value from the slider ("continuous" update is not needed). So I'm trying to get listed directly "outlet", when I right-click on my app control object (one for every item shown above) on the slider control in my window But when I cnt-drag to the slider related to App Control Outlet, the slider will not "accept" the arrow that I'm dragging.

Does this make sense? Any ideas which I need to do wrong and / or what I need to do? I save / build / closing & amp; Reopening IB and Xcode - To ensure that the IB has the latest version of everything, there is no luck though.

One last thing ... I really need CGFLot number, from the slider. Can I declare outlet as a CGFlot type ... or do I need to define it as NSTextField (or something), and then convert it to float in my program? You can see in the IBOutlets that I have pasted, that I was trying different types of data for outlets (trying to see if I had to define bindings in some way to define CGFlot).

Then you should be able to connect with it. When you need a price (that is, if you mention it in response to the button, then press) [yourSliderOutletName doubleValue] .

More generally: a IBOutlet is a nib file awoken for the real object can be filled with an indicator like an ivar, it is To catch the pointer should be a proper type - the actual class of the object, or one of its supercomputer or protocols, or (at least informative) id you can only place the object in any of the old variables Not like adding, like your CGFloat no underlying conversion It is - the system should know what you want?


Comments

Popular posts from this blog

windows - Heroku throws SQLITE3 Read only exception -

lex - Building a lexical Analyzer in Java -

python - rename keys in a dictionary -