Re: How much does NSObject's bind:toObject:withKeyPath:options: do?
Re: How much does NSObject's bind:toObject:withKeyPath:options: do?
- Subject: Re: How much does NSObject's bind:toObject:withKeyPath:options: do?
- From: Mailing list subscriptions <email@hidden>
- Date: Sat, 23 Sep 2006 10:24:10 +0200
El 23/09/2006, a las 5:49, Matt Neuburg escribió:
I always search the list archives before posting and this case is no
exception. I searched for "programmatic bindings" and scanned all of
the results but none seem to match my question; they mostly deal with
using Bindings with standard Cocoa NSViews.
"I did one search and found nothing, so there's nothing." Fine, I
guess that
settles it, and means that you're not interested in being pointed
at some
relevant threads?
That one search found 342 messages over a number of years, large
enough to be a statistically meaningful sample covering a wide range
of topics relating to the programmatic manipulation of Cocoa
Bindings. I scanned all of them and none of them seemed to address my
question. I believe it was an intelligent, diligent search, and your
sarcastic attitude is very annoying.
And yes, I *am* interested in being pointed at some relevant threads,
(note that in my last email I said, "If you can think of some better
search terms than "programmatic bindings" that could help me zero in
on the relevant messages in the archives then please let me know."),
but it seems that you are more interested in acting clever and smug.
My tone, up to now, has been pleasant and inquisitive. Yours, for
some reason that I don't know, has been hostile and aggressive. If
you have nothing constructive to add, please don't add it.
1. How much work does the default NSObject implementation of
bind:toObject:withKeyPath:options: do, if anything, or is it always
necessary to subclass it?
I do not know what it would mean to "subclass an implementation of a
method".
You're trying your very hardest to be difficult. Although I may not
have used the exact terminology that you would, it's patently obvious
that I mean "overriding, in the subclass, the implementation of
method of the superclass".
If you want to know what a home-made implementation of bind: needs
to do in order to mimic what, say, a checkbox does when you bind it
in IB,
see mmalc's GraphicsBinding example.
As I said in my initial post, I've already seen these examples. But
given that none of the examples handle the exact usage case that I am
interested in, I tried to come to the list asking if it was necessary
to provide this implementation. I've received nothing but sarcasm and
bile in return.
... but even if it
weren't, I wouldn't want to embark on this course of action without
being sure that it's the "right thing" to do. I *know* I can make
this work with either more or less work, but I don't want to do stuff
that goes against the intended Cocoa Bindings best practices.
But that is the very matter that I have already termed "religious".
By that
I mean that it is not entirely clear that there can be a "right"
answer.
How about any answer then? How about an opinion from someone? All
I've gotten so far is you attacking me.
All I can do at this point is repeat myself. Argumentation about would
constitute "best practice" appears a-plenty in the archives.
I am interested in best practice, but I am also interested in the
specific question (in the subject line), *what* does the NSObject
implementation of bind:toObject:withKeyPath:options: actually do?
Does it actually do anything useful, or does it always have to be
overridden, as seen in the examples? One of the reasons I ask is that
the presence of such examples doesn't tell me that you have to
override it, it only tells me that you can; the docs don't say,
"you've got to override this for it to be useful" (as is the case in
many other methods in the frameworks). I am just trying to tap in to
the wisdom (and not the sarcasm) of people who have more knowledge
about the internal workings of Cocoa Bindings than I.
(There is also
what I was told by Apple's primary bindings engineer when I explicitly
raised the matter at WWDC. Unfortunately I think it might violate
NDA if I
were to recount that interchange here.)
Well, that's a shame as I am sure many people on the list would
appreciate it. If it has nothing to do with Leopard (ie. unreleased
code) then I doubt Apple would mind you talking about it.
If you want to talk about some *specific* thing you want to do,
that might
be a more fruitful approach. For example, my shipping app NotLight
uses
bind: all over the place to keep multiple values in sync.
Perhaps you could answer at least one of my questions then. Do you
use bind:toObject:withKeyPath:options: outside of the MVC paradigm in
its purest form? ie. do you use it in a controller-controller
relationship? Or in classes which are model/controller composites etc?
_______________________________________________
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