name of current list in OS10.1

Kelly Burgess kellyb at
Mon Jan 4 04:42:33 UTC 2021

Hi Andrew,

> . . . . .
>I was looking for notation to auto set the line height so in the above notation the word List could be replaced with the name of the list automatically

That could work IF the $name of your headed list object matches the list variable $dataname of the object - that's a convention you could adopt, but it's not always the case, and it wouldn't be obvious that renaming the headed list or changing the list $dataname would cause your code to break.

If there's only one headed list in your window, you could consider a two-liner using a local hlName variable:

   Do $cwind.$objs.$sendall(hlName.$assign($sendallref.$name),$ref.$objtype=kHeadedListBox)
   Do $cwind.$objs.[hlName].$linehtextra.$assign(lvLineHeight)

And if there are multiple headed lists in that window, maybe you could extend the $sendall's condition parameter to test for a $ref.$userinfo value, and use $userinfo to identify the headed list you want to target. (..,$ref.$objtype=kHeadedListBox&$ref.$userinfo='x')


More information about the omnisdev-en mailing list