$selected

Doug Easterbrook doug at artsman.com
Sat Apr 16 17:50:23 UTC 2022


to find total selected

calc #1 as  list.$totc(#lsel)

to check each line in a list to see if its selected

for list.$line from 1 to list.$linecount
   if list.$selected
      ok I’m selected
  end if
  # which is equivalent to the following .. 
   if list.[list.$line].$selected
      ok I’m selected
  end if
  # which is equivalent to the following ..    
   if list.0.$selected
      ok I’m selected
  end if

end if

in the above:   nothing and [list.$line] and 0 are equivalent.  all imply the current line





to check any specific line is selected

if list.3.$selected
   ok I’m selected
end if



to refer to a list line using a variable

calc #1 as 18.  (checking line 18
if list.[#1].$selected
   ok I’m selected
end if


Doug Easterbrook
Arts Management Systems Ltd.
mailto:doug at artsman.com
http://www.artsman.com
Phone (403) 650-1978

> On April 16, 2022, at 10:28 AM, Das Goravani <goravanis at gmail.com> wrote:
> 
> 
> Dear all,
> 
> I have tried the archives and the manual and cannot find a suitable answer for this.
> 
> If your list line is variable in your method, how do you test if it’s selected.
> 
> I know there is $selected, but it only appears as an option after a line line number, as in:
> 
> myList.3.$selected
> 
> If in your method you don’t know the line number, or rather it’s coming to the method as a variable, then how do you do it?
> 
> Do you do:
> 
> myList.$line.$selected?
> 
> If you type that, up to the $line, after that $selected does not appear as an option.
> 
> I’m sorry to ask these basic questions.
> 
> I’ve been succumbing to 
> 
> Set current list myList
> If #LSEL=1
>  Then do the thing
> End if
> 
> I don’t want to do that anymore.
> 
> Thanks
> 
> Das
> _____________________________________________________________
> Manage your list subscriptions at https://lists.omnis-dev.com
> Start a new message -> mailto:omnisdev-en at lists.omnis-dev.com 



More information about the omnisdev-en mailing list