Handling of final delimter (was Re: "this me"?)

Richard Gaskin ambassador at fourthworld.com
Sun Aug 11 23:32:12 EDT 2013


Mark Wieder wrote:

> Jacque-
>
> Sunday, August 11, 2013, 7:25:47 PM, you wrote:
>
> put "this is line 1" & cr into field 1
> put "this is line 2" & cr & cr after field 1
> put the number of lines in field 1
> -- but there are actually four lines in field 1.

With "x" as data and "|" as the terminator, the above gives us:

x|x|<empty>|

So if we keep in mind that:

      ...what we're counting is any chunk that's terminated,
      either by the delimiter or by simply being the end of
      the string...

...it still fits the engine's logic.

Chunk expressions are independent of UI conventions; whether items or 
lines we should expect the same rules to apply.

The position of the cursor is not data, merely a function of UI 
conventions for the placeholder where you can begin to add data if you 
choose.

--
  Richard Gaskin
  Fourth World
  LiveCode training and consulting: http://www.fourthworld.com
  Webzine for LiveCode developers: http://www.LiveCodeJournal.com
  Follow me on Twitter:  http://twitter.com/FourthWorldSys




More information about the use-livecode mailing list