> On Mar 21, 2008, at 12:16 PM, Mike Schrag wrote:
>
>> I think most people just end up generating both the getter and
>> setter, so they never notice?
>
> I suspect that you are correct.
>
>> I actually was checking the inverse case when I started working on
>> this particular bug (make sure you have the set) -- and hadn't
>> considered that you might just not even define the "get".
>
> I probably focus too much on eliminating unneeded code.
So I just wrote in all the checks to support being able to validate
this and then, as with everything related to validation, ran into some
complications. As it turns out, the definition of WORepetition's API
is:
<wo class="WORepetition" wocomponentcontent = "true">
<binding name="item" passthrough="NO" settable="YES"/>
<binding name="list" passthrough="NO"/>
<binding name="count" passthrough="NO"/>
<binding name="index" passthrough="NO"/>
<binding name="identifier" passthrough="NO"/>
...
</wo>
So the complications here are 1) there's nothing special about the
"index" binding that actually tells the validator that it only sets
the value and does not get the value and 2) it seems odd that it's not
marked "settable", but maybe I'm misinterpreting what settable means.
I thought settable meant that the parent component should expect the
child component to push a value back out, but then index should be
marked settable also, and it's not.
So now I have to decide if I should checkin what I have. The old code
would only consider a "get" a key. The new code checks for a "get"
first, and if it doesn't find one, then it checks for a "set", which
is enough to qualify. My concern with this is that the vast majority
of the time the "get" is actually the one that matters more (there are
a lot more that require get than require set), and people are terribly
lazy with API files, so if I'm going to do the checking, we may want
to continue to require the get .... Mixed feelings on this, though.
I'll have to think on this some.
ms
This archive was generated by hypermail 2.0.0 : Fri Mar 21 2008 - 18:41:48 EDT