-- AppleLink: UG0001. Delphi,GEnie,BIX, the Well, MCI Mail: BMUG
-- CIS:70007,2271. ATT: (415) 849-9114. -- --
on mouseUp
if the selection is empty then
set lockText of the target to false -- unlock to enable text editing
repeat two times
click at the clickLoc -- double click where the user clicked
end repeat
set lockText of the target to true
end if
if the selection is not empty then -- we got a hit...
set lockText of the target to true
go card selection -- This line is the link... see below.
end if
end mouseUp
Alternative* forms of linking include:
-- Searching a field of another stack: [instead of "go card selection" substitute:] put selection into holder
-- holder is a local var, just temporary go to stack
"George's contribution" -- Part of a collaborative project, for instance find
word holder in field "keywords" if the result is "not found" then
...
-- Only responding to words with an asterisk after them: [after "end repeat" of double click]
click at ((last item of rect of the target)-10, (second item of clickLoc)) with ShiftKey -- shift-click at end of line to catch rest of line -- 10 is the width of the scrollbar
if offset ("*",selection) = length of word 1 of selection then -- last char of 1st word is a "*" => OK to xref ...
else
click at clickLoc --disable selection
set the lockText of the target to true
... -- Selecting whole line [like SFGetFile]: [instead of repeat loop with
click]: click at (first item of the rect of target), (second item of the
clickLoc) click at (third item of the rect of target)-10, (second item of the
clickLoc) with shiftKey ... -- Deferred action [instead of go card...] show