Re: determining if cursor is in last line of a field

2013-09-19 Thread dunbarx
awkins To: How to use LiveCode Sent: Thu, Sep 19, 2013 11:19 am Subject: Re: determining if cursor is in last line of a field On Thu, Sep 19, 2013 at 1:08 AM, Mark Schonewille < m.schonewi...@economy-x-talk.com> wrote: > Probably, that won't do it. Try this: > > put (number

Re: determining if cursor is in last line of a field

2013-09-19 Thread Dr. Hawkins
On Thu, Sep 19, 2013 at 1:08 AM, Mark Schonewille < m.schonewi...@economy-x-talk.com> wrote: > Probably, that won't do it. Try this: > > put (number of lines of the formattedText of \ >char 1 to (word 2 of the selectedChunk) of myTarget) is \ >(the number of lines of the formattedText of

Re: determining if cursor is in last line of a field

2013-09-19 Thread Mark Schonewille
Hi Richard, The selectedLine counts the number of hard returns. Just try it. -- Best regards, Mark Schonewille Economy-x-Talk Consulting and Software Engineering Homepage: http://economy-x-talk.com Twitter: http://twitter.com/xtalkprogrammer KvK: 50277553 Use Color Converter to convert CMYK,

Re: determining if cursor is in last line of a field

2013-09-19 Thread Mark Schonewille
Hi Richard, Probably, that won't do it. Try this: put (number of lines of the formattedText of \ char 1 to (word 2 of the selectedChunk) of myTarget) is \ (the number of lines of the formattedText of myTarget) --> true|false -- Best regards, Mark Schonewille Economy-x-Talk Consulting

Re: determining if cursor is in last line of a field

2013-09-18 Thread Dr. Hawkins
On Wed, Sep 18, 2013 at 9:02 AM, Mark Schonewille < m.schonewi...@economy-x-talk.com> wrote: >put number of lines of the formattedText of \ >char 1 to (word 2 of the selectedChunk) of me > Ah. Obvious now that you mention it :) Thank you. And to make me feel *really* sheepish: I was

Re: determining if cursor is in last line of a field

2013-09-18 Thread Mark Schonewille
Hi Richard, There are probably many ways to do this, Here's one: put number of lines of the formattedText of \ char 1 to (word 2 of the selectedChunk) of me -- Best regards, Mark Schonewille Economy-x-Talk Consulting and Software Engineering Homepage: http://economy-x-talk.com Twitter

Re: determining if cursor is in last line of a field

2013-09-18 Thread dunbarx
Try this: answer the formattedText of fld "yourField" It wraps unwrapped text with hard returns, and that will give the last line Craig -Original Message- From: Dr. Hawkins To: How to use LiveCode Sent: Wed, Sep 18, 2013 11:23 am Subject: determining if cursor is in last line o

Re: determining if cursor is in last line of a field

2013-09-18 Thread Dr. Hawkins
On Wed, Sep 18, 2013 at 8:34 AM, Peter M. Brigham wrote: > Not sure what you mean, "how the field is actually formatted." If you are > talking about possibly having empty lines following the last text in the > field, then >the number of lines of (word 1 to -1 of fld "myField") > would work. C

Re: determining if cursor is in last line of a field

2013-09-18 Thread Peter M. Brigham
On Sep 18, 2013, at 9:22 AM, Dr. Hawkins wrote: > If selectedLine() is 1, I am in the first line of a field. > > I can't tell, though, what the last line is--"the number of lines" relies > on CR, not how the field is actually formatted. > > I've looked for other "line" entries in the dictionary,