Loading ...
Sorry, an error occurred while loading the content.

Re: [Clip] What is the difference between GetRow and GetRowStart?

Expand Messages
  • Axel Berger
    ... Quite, but you only quoted part of the explanations. It seems ^$GetRow$ and ^$GetRowStart$ really are the same thing. They all, including ^$GetRowEnd$,
    Message 1 of 2 , Dec 8, 2009
    • 0 Attachment
      joy8388608 wrote:
      > ^$GetRow$
      > Returns line index of cursor in current document.
      > ^$GetRowStart$
      > Returns the cursor line index in the current document.

      Quite, but you only quoted part of the explanations. It seems ^$GetRow$
      and ^$GetRowStart$ really are the same thing. They all, including
      ^$GetRowEnd$, return the line number of the cursor position if nothing
      is selected. If something is, the selection, or rather its start, takes
      precedence over the cursor in the case of the older ^$GetRow$.
      As the selection can cover more than one line, the more specific
      ^$GetRowStart$ and ^$GetRowEnd$ were defined two subversions later.

      It is probably best to use the simple ^$GetRow$ for the cursor and the
      other two for selections. I'd say the selection in ^$GetRow$ was
      retained for compatibility so as not to break older and proven clips and
      the cursor is used with the other two as a fallback when nothing is
      selected rather than throwing an error. Two quite reasonable decisions,
      I'd say, but they do result in some ambiguity.

      Axel
    Your message has been successfully submitted and would be delivered to recipients shortly.