Re: More binding questions
Re: More binding questions
- Subject: Re: More binding questions
- From: Steve Weller <email@hidden>
- Date: Thu, 14 Jul 2005 09:08:51 -0700
At 10:30 PM -0700 7/13/05, mmalcolm crawford wrote:
On Jul 13, 2005, at 10:03 PM, Steve Weller wrote:
I found that I could throw away ClickerController and bind
everything to Clicker instead. What does the ClickerController do
for me that Clicker does not?
<http://developer.apple.com/documentation/Cocoa/Conceptual/CocoaBindings/Concepts/WhatAreBindings.html#//apple_ref/doc/uid/20002372-177085>
So NSControllers add placeholder values for null and multiple
selections. But NSObjectController only has one object to control, so
the placeholder is only useful if you haven't connected it to its
controlled object -- probably an error. They also allow the
controller to manage pending edits, either committing or aborting.
This does look useful, but not in my little app, since I have no
persistent store or preferences to update. So in my particular case I
am fine without an NSController.
The link you provide above provides a lot of useful information about
bindings and it is more meaningful to me now I have attempted my own
app. However it does exactly what I was griping about in my previous
emails: gives a shallow view of complex example (combatants) to show
off how clever the technology is rather than a detailed simple one
that is designed to complete the user's learning experience.
The learner is reading the document because they do not understand
bindings. As they go down the page they encounter new terminology and
concepts and get some of their questions answered and remember some
of what they have just read. But then instead of concreting the
learner's partially-formed mental model, the example at the end
scatters that model by raising a host of new questions.
What is worse is that the "real-world" example (combatants) is not
the same as the example that has been in use all the way down the
page (temp converter), so the learner has just wasted effort in
trying to grok how and why it does what it does.
My concrete suggestions are thus (and will be submitted to Apple)
* Replace combatants with temp converter as the real-world example
* Detail the diagram with "bind x to y"
* Show the objects set up with these bindings with IB screenshots
(the finished set up only) so the learner has the opportunity to try
to reproduce what they have read without a tutorial
This document in general should also distinguish very clearly between
binding and KVO since the learner is attempting to learn many things
at once:
* Binding is a two-way synchronization system built using the one-way
observing facilities of objects that support KVO
* Binding set-up and tear-down is done behind the scenes if
established with IB, or can be done explicitly using bind:, whereas
KVO has to be set up and torn down programatically (am I correct
here?)
--
How much art could an artichoke choke if an artichoke could choke art?
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden