Page 1 of 1
Get active line in field
Posted: Sun Mar 25, 2012 4:31 am
by doobox
Hi there,
I cant seem to find the way to get the active line (currently flashing text cursor), in a text field..?
I am needing something resembling :
on textChange
put the activeLine of field "textField" into tCurrentWorkingLine
end textChange
Re: Get active line in field
Posted: Sun Mar 25, 2012 6:45 am
by doobox
Ahhh.. got it..
Code: Select all
on mouseUp
put "test" after the selection
put the lineIndex of the selection into tCapturedLine
put line tCapturedLine of field "test" into field "capturedLine"
end mouseUp
Re: Get active line in field
Posted: Sun Mar 25, 2012 12:15 pm
by Klaus
Hi Gary,
... the lineindex of the selection...????
Where did you find this?
Best
Klaus
Re: Get active line in field
Posted: Sun Mar 25, 2012 12:35 pm
by Dixie
Klaus...
He got it from the dictionary...
be well
Dixie
Re: Get active line in field
Posted: Sun Mar 25, 2012 12:50 pm
by Klaus
Oh, this is LC 5.5, right?
OK, in that case I will not find it in MY dictionary yet

Re: Get active line in field
Posted: Sun Mar 25, 2012 1:18 pm
by doobox
I did not find it in the dictionary.. Just guess work. Does the job though

Re: Get active line in field
Posted: Sun Mar 25, 2012 1:29 pm
by Klaus
Hi Gary,
well, it IS not in the dictionary, that's what's puzzling me

So are you using LC 5.5?
Best
Klaus
Re: Get active line in field
Posted: Sun Mar 25, 2012 1:32 pm
by doobox
Here is the concise way i ended up using it :
Code: Select all
on textChanged
put the lineIndex of the selection into tCapturedLine
put line tCapturedLine of me into field "currentLine"
end textChanged
Year 5.5 but i don't see it in dictionary here either.
Re: Get active line in field
Posted: Sun Mar 25, 2012 1:39 pm
by doobox
I tell a lie... lineIndex is there :
Examples:
-- Example: 2 lines of text in a field
-- Hello World
-- Goodbye World
the lineIndex of char 7 of field 1 -- 1
-- char 7 is on line 1
the lineIndex of word 4 of field 1 -- 2
-- word 4 is on line 2
Re: Get active line in field
Posted: Sun Mar 25, 2012 2:16 pm
by sturgis
Ok wow. I obviously need to go through the new dictionary!
Re: Get active line in field
Posted: Sun Mar 25, 2012 3:48 pm
by Klaus
Looks like I need to get some bucks and buy the update

Re: Get active line in field
Posted: Sun Mar 25, 2012 5:42 pm
by jacque
The first thing I always do after a release is read the release notes, which are in the Help menu. At the bottom of the notes is a summary of all the new features. Then I know what to look up in both the release notes and the dictionary.