Total Lines Problem - Not Adding Up :-(

Mark Smith mark at maseurope.net
Tue Apr 4 22:49:25 EDT 2006


This is a recurring question, due to the way rev handles empty lines.
If I have this right, an empty line at the end of a list (or field, or
whatever) will not be counted, while an empty line that is not the
last line will be. There are differing views about whether this is
desirable behaviour, but it's what happens...

Best,

Mark

On 4/5/06, Garrett Hylltun <garrett at paraboliclogic.com> wrote:
> Rev 2.6.1 / MacOS X
>
> Greetings,
>
> I'm not sure if I'm overlooking something or if it's just the way Rev
> works, but when I start a new line in a multi-line field from the last
> line in the field, the new line is not being counted using;
>
>    put the number of lines of field "fEditor" into varTotalLines
>
> (or maybe it is, but the way I'm handling the messages isn't correct),
> unless I type another character or space.
>
> This only seems to happen though if you are on the last line of the
> field and hit the enter key.  If you are on another line before the last
> line and hit the enter key, no problem.  Or, if you are on the line that
> is not being counted and hit the backspace key, a line from the count is
> removed, but the line you are on is still not being counted.
>
> I've uploaded a small test file if anyone is interested in checking this
> out to see if I'm doing something wrong.
>
> http://www.paraboliclogic.com/misc/totallinesproblem.rev
>
> Messages used are in the "Field" script and the code for the number of
> lines is in the "Stack" script.
>
> If this little anomaly can be made to go away, great, if not, I guess I
> can live with it.
>
> Thanks,
> -Garrett
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
>



More information about the use-livecode mailing list