Cursor.Postion property

Erne ernestogiannotta at tiscalinet.it
Sun Feb 12 15:18:40 CST 2006


Hi Ruslan,

On 12-feb-06, at 12:48, Ruslan Zasukhin wrote:

> On 2/12/06 1:11 PM, "Erne" <ernestogiannotta at tiscalinet.it> wrote:
>
> Hi Erne,
>
>>> Position as Integer
>>> The current position in the cursor. You can set or get the current
>>> position of cursor using
>>> this property.
>>> The valid range of values is from 1 to the RecordCount.
>>> When you assign a new value to the CurrentPosition, Valentina loads
>>> a record from the
>>> disk to the memory buffer.
>>>
>>> Note: If you try to assign a wrong value then the current record is
>>> not changed.
>>
>> On V1 in this case the cursor did set to position 0
>> thus setting the buffer to the like of a blank record
>
> Don't you remember if this was document in v1 ?
>

no, I guess it was undocumented

>> It was very handy for my purposes, any chances we could revert back
>> to old behaviour?
>>
>> (guess I know the answer, but giving it a try anyway ;-)
>
> And how you have use that old behavior ?
>

I positioned the cursor to record 0
(vale would do it for any out of range value passed to the  
Cursor.CurrentPosition function)
then fill the window fields with blank values but no new record has  
yet been created
if the user makes some edit the CollectRecord method would check the  
position of the cursor
if it's 0 then add a new record to the cursor and fill it with user's  
input

Now I must use an Adding flag in the window to manage it

well, not a great deal
Old behaviour was just more cool
(less code branching)

>
>
>
> -- 
> 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]
>
>
> _______________________________________________
> Valentina mailing list
> Valentina at lists.macserve.net
> http://lists.macserve.net/mailman/listinfo/valentina

Cool Runnings,
Erne.

/ |\ |\  | /
– |/ | \ | –
\ |\ |  \| \



More information about the Valentina mailing list