AW: AW: Selected Line Only

Rudolf Bargholz rudolf at bargholz.ch
Mon Jul 11 09:34:42 UTC 2022


Hi Martin,

Speed. In many versions of Omnis Studio the List.$linecount would be re-interpreted on every loop of the list, slowing down processing, especially of large lists. If you put the List.$linecount  into a variable, you can speed up loop processing dramatically for large lists.

Regards

Rudolf

Von: Martin Obongita <martin.obongita at yahoo.com>
Gesendet: Montag, 11. Juli 2022 11:01
An: OmnisDev List - English <omnisdev-en at lists.omnis-dev.com>; Rudolf Bargholz <rudolf at bargholz.ch>
Betreff: Re: AW: Selected Line Only

Hi Rudolf,

Why use the variable of iList.$linecount in the For loop instead of using iList.$linecount directly?

Martin.



On Monday, July 11, 2022 at 07:45:50 AM GMT+3, Rudolf Bargholz <rudolf at bargholz.ch<mailto:rudolf at bargholz.ch>> wrote:


Hi Martin,

Calculate lLineCount as List.$linecount
For List.$line from 1 to lLinecount step 1
  If List.0.$selected
    ... Do stuff on the selected lines
  End If
Enf For

If you are in an object class, in an instance, then the following can also work:

Do List.$sendall($cinst.$processLine($sendallref),$ref.$selected)

For each selected line the method $processLine is called with the List as a field reference parameter with the appropriate selected line set as current.

Regards

Rudolf Bargholz

-----Ursprüngliche Nachricht-----
Von: omnisdev-en <omnisdev-en-bounces at lists.omnis-dev.com<mailto:omnisdev-en-bounces at lists.omnis-dev.com>> Im Auftrag von Martin Obongita via omnisdev-en
Gesendet: Sonntag, 10. Juli 2022 22:21
An: omnisdev-en at lists.omnis-dev.com<mailto:omnisdev-en at lists.omnis-dev.com>
Cc: Martin Obongita <martin.obongita at yahoo.com<mailto:martin.obongita at yahoo.com>>
Betreff: Selected Line Only

Hi Friends, What is the syntax for "Selected lines only" in the FOR loop statement, For each line in list from 1 to iDataList step 1?


_____________________________________________________________
Manage your list subscriptions at https://lists.omnis-dev.com <https://lists.omnis-dev.com%20> Start a new message -> mailto:omnisdev-en at lists.omnis-dev.com<mailto:omnisdev-en at lists.omnis-dev.com>



More information about the omnisdev-en mailing list