1

I am reading "What are Cocoa Bindings" in Apple's documentation.

Note that this implementation does not use the target-action pattern. The slider does not send an action message to the controller. Instead, as the slider moves, it informs the controller directly that the value of its content’s number has changed and what the value is. The controller updates the model and in turn informs the text field and slider that the value they are displaying has changed.

What is meant by "informing directly"? How is it different from sending a message?

1 Answer 1

2

It means that it updates your model's value without having to write any logic to do so. So if you have a slider, without Bindings, you would hook it up to a method, and handle the logic to modify your model inside that method. Bindings will change it for you, and if anything else is bound to that value, it will update automatically. Did that help?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.