[V4RB] GoToRecID(xx)

Ruslan Zasukhin sunshine at public.kherson.ua
Mon Jul 10 19:51:39 CDT 2006


On 7/10/06 7:34 PM, "Charles Yeomans" <yeomans at desuetude.com> wrote:

>>>> Yes, in fact METHOD
>>>> 
>>>>     tbl.Goto( inRecID ) as Boolean
>>>> 
>>>> Do more job than property. It also can check if such record
>>>> exists and
>>>> return bool result...
>>> 
>>> 
>>> Please don't force that interface style on us.
>> 
>> Sorry, Charles, I have not catch your point of view ?
>> 
>> You against to add such method ? Why ?
> 
> Why do it that way?  We could have a property VTable.CurrentRecID as
> Integer.  

We have it right now :

    VTable.RecID


> If you try to assign a bad value to CurrentRecID, then the
> function could either return or raise an exception;

No, it cannot return...because this is a property of class.
It can throw exception but I think this is too hard for developers handle
this ...

Right now the only way write code is:

    if tbl.RecordExists( recid ) then
        tbl.RecID = recid
    else

    end if
    
Function Vtable.Goto( recid ) as Boolean actually do exactly this code..

So it is only *cosmetic* to allow write code as simple as:

    if tbl.GoTo( recid ) then

    else
    
    end if

> since it is easy to check CurrentRecID as needed, I favor the former,
> reserving an  exception for other problems.



-- 
Best regards,

Ruslan Zasukhin
VP Engineering and New Technology
Paradigma Software, Inc

Valentina - Joining Worlds of Information
http://www.paradigmasoft.com

[I feel the need: the need for speed]




More information about the Valentina mailing list