"Find" Not Hilighting Found Text
katir at hindu.org
Thu Mar 18 23:10:02 CST 2004
I thought I had this solved several years ago, but it's back: Find does
not hilite (put a box around) text on the first hit...
I put a lot of text matter, mostly ebooks repurposed from print
versions, into Rev for fast searching. Break out entire chapters or
part of chapters or numbered paragraphs to single cards and make a
Table of Contents of these etc.
For searching I use a Find and Find Again pulldown menu (see scripts
Aside from the nuisance that the cmd-keys (Mac OSX) don't work in the
IDE, even if you suspend it... another problem shows up even in a
standalone: that is, that if you hit cmd-F, search for "task force" my
script does take me to the card and scrolls the card, but does not
hilight the word... I have to hit cmd-G again, to get it to hilight the
word again, the first instance on the card, as expected. Then, if I hit
cmd-G again, it moves on to another card with an instance of "task
force" but does not hilight the word. You have to hit cmd-G again.
This may be a correlary bug to the one where pasting into a text field
leaves you with no cursor, -- very disconcerting. The issue "smells"
similar, the field is not being updated in the video card to show
a) the foundText box around text or
b) the cursor
any insights? I supposed i can use complicated offset search routine
and force the text to be highlighted once the exact chunk is
determined,, but I was thinking there might be a simple solution to
make the engine's native "find" command to perform as expected.
Button Name : "Find"
on menupick tItemChosen
case "Find Again"
In the stack script:
## lock messages required if you want to be able to search forward to
the next instance
## but, maybe it is the problem also... not allowing the find to
outline the find text.
ask "Find:" with gLastFind
if it is empty then exit searchForIt
put it into gLastFind
find string gLastFind
if the result is "Not Found" then
answer quote&gLastFind"e&" not found." with "Try Again" or
if it is "cancel" then exit doFind
Himalayan Academy Publications
More information about the use-livecode