I am trying to get clickLine to work as per:
Code: Select all
select the clickLine
put the value of the clickLine into tLine
put word 1 of line tLine of fld "facility use" into tTime
Can anyone suggest what I might be doing wrong?
Thanks.
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Code: Select all
select the clickLine
put the value of the clickLine into tLine
put word 1 of line tLine of fld "facility use" into tTime
Hi Klaus,Klaus wrote:Hi garyth,
is this an editable field or is it locked?
Best
Klaus
Hi Jacque,jacque wrote:Without trying it, it almost sounds like a linkClicked message is being sent and somehow cancelling out the clickline function.
Do you have a linkClicked handler? Does it get triggered?
Code: Select all
...
put word 1 of the value of the clickLine into tTime
put the clickChunk into tClickedText
linkClicked tClickedText
Code: Select all
local aVar
on mouseUp
--testLink
f1
answer "aVar is " & aVar with "Ok"
--testLink
end mouseUp
on f1
put word 1 of the value of the clickLine into aVar
end f1
--on linkClicked pLinkText
-- beep
--end linkClicked
--on testLink
-- put the clickChunk into tClickedText
-- linkClicked tClickedText
-- answer tClickedText
--end testLink
Code: Select all
on mouseUp
--testLink
f1
answer "aVar is " & aVar with "Ok"
--testLink
end mouseUp
on f1
put word 1 of the value of the clickLine into aVar
end f1
Code: Select all
local aVar
on mouseUp
testLink
put f1() into aVar
answer "aVar is " & aVar with "Ok"
--testLink
end mouseUp
function f1
local tVar
put word 1 of the value of the clickLine into tVar
return tVar
end f1
on linkClicked pLinkText
beep
end linkClicked
on testLink
put the clickChunk into clickedText
linkClicked clickedText
answer clickedText
end testLink
Code: Select all
local firstWord
on mouseUp
--answer "text clicked is " & testLink() with "Ok"
put f1() into firstWord
answer "firstWord is " & firstWord with "Ok"
--answer "text clicked is " & testLink() with "Ok"
end mouseUp
function f1
local tVar
put word 1 of the value of the clickLine into tVar
return tVar
end f1
--on linkClicked pLinkText
-- beep
-- answer "clickedText is " & pLinkText with "Ok"
--end linkClicked
--function testLink
-- put the clickChunk into clickedText
-- linkClicked clickedText
-- return clickedText
--end testLink
Code: Select all
on mouseUp
if the textstyle of the clickChunk = "link" then
put the clickText into tText
put the clickChunk into tChunk
doYourThing
else
dontDoYourThing --clicked text is not a group text
end if
end mouseUp
Code: Select all
on mouseUp
if the textstyle of the clickChunk = "link" then
put word 1 of the clickLine into tLine
yourFunction tLine
end if
end mouseUp
on yourHandler tLine
answer tLine
doYourThing
end yourHandler