[V4RB2.1] VSet position ?

Ruslan Zasukhin sunshine at public.kherson.ua
Tue Jan 31 14:20:08 CST 2006


On 1/31/06 12:31 PM, "Daniel FLEURY" <daniel.fleury at free.fr> wrote:

>> Do you mean that you have RecID and you want find its position in ArraySet?
> 
> Yes, right
> 
> 
>> 
>> So you have ArraySet with some records,
>> Then you add record ... Get new RecID
>> 
>> And you want insert it into ArraySet ?
>>     even more ... To keep array sorted?
> 
> example:
> 
> newRecID=table.addrecord()
> allRecords=table.SelectAllRecords()
> allRecordsSortedByField=table.Sort(allRecords, table.field("aField"),
> true)//I update the VArraySet
> 
> and now I would like something like=
> newPosition=allRecordsSortedByField.position(newRecID)

Moment. Note that allRecordsSortedByField do NOT contains this new RecID.

Because when you have create it this record did not exists.
You need self append new item into array and item will go into END of array.
 
So this will be like Windows do :-)

> mySlider.value = newPosition

Well I see next way:

- after add of new record you need create new set and sort it again.

- then you can use NEW function which we can add:
            
    index = Varray.IndexOf( recid )

So you can set correctly yor slider.


>> I think there is no such API now.
> 
> It would be usefull !

Please add request into Mantis


>> You want keep it sorting how?  By values of RecID?
>> Because if you have array that keep sort order e.g. by field f1,
>> 
>> Then you cannot know where to insert that new RecID.



-- 
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-beta mailing list