Total Lines Problem - Not Adding Up :-(

Jim Ault JimAultWins at yahoo.com
Wed Apr 5 02:47:08 EDT 2006


My technique if the last line empty is important

get the number of lines in (fld listing & null)
which will always be accurate.

Jim Ault
Las Vegas



On 4/4/06 6:49 PM, "Mark Smith" <mark at maseurope.net> wrote:

> 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
>> 
> _______________________________________________
> 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