VLink Mess Re: FindLinkedSingle ?

Ed Kleban Ed at Kleban.com
Mon Dec 12 13:38:39 CST 2005




On 12/12/05 5:26 AM, "Ruslan Zasukhin" <sunshine at public.kherson.ua> wrote:

> On 12/12/05 7:42 AM, "Ed Kleban" <Ed at Kleban.com> wrote:
> 
>> Nope. The list below won't work.   I just couldn't figure out before "Why in
>> the world would you pass TableA and TableB arguments to FindLinked when the
>> Vlink already knows what the tables are?"
>> 
>> The answer of course is that it doesn't know what the tables are.  a
>> VBinaryLink knows, but the FindLinked method has been defined to work on all
>> types of Vlinks including Foreign Keys and presumably ObjectPtr links.
> 
> Not only this reason.
> 
> Mainly because with tables you can specify ORDER different than link it know

Plus the fact that it makes it explicit in the call what tables are involved
rather than relying on your memory of what's on left and what's on right in
the declaration.
 
Plus the fact that it allows the function to perform a check to make sure
that the tables you reference are indeed part of the link and therefore
offers an opportunity for a logic integrity check.  I presume you're
checking the tables that are specified some way.

Yeah, as I say, sleep is a good thing.  I thought up a lot of good reasons
to shift back to reconsidering this as a good syntax.  Especially after I
realized late last night that this was a syntax for all Vlinks, or at least
all V2Links, not just VBinaryLinks.

It's taking a while, but I'm coming around.  Not 100% there yet however.

As it turns out I've also grown fonder, after some actual coding time this
morning of kFromParentToChild and kFromChildToParen... and in the end it may
be that my frustration was nothing more that this was completely
undocumented in the manuals -- which is something I can certainly contribute
some help on if I'm sufficiently pissed off.

But I'm not 100% there on the recursive cases either yet.

--Ed




More information about the Valentina mailing list