Browser Fields

MisterX b.xavier at internet.lu
Fri Oct 14 00:41:15 EDT 2005


Alex

try this

The other button mentioned in the script is a checkbox to do search or
filters.
It's also easy to extend to do multi-hilites like Firefox.

<script> in field

on backspacekey
  send "keyup" to me in 300 milliseconds
  pass backspacekey
end backspacekey


on keyup thekey
  get me
  if it = empty then pass keyup
  if not the hilite of btn "Filter" then
    get lineoffset(it,fld "index")
    set the hilitedline of fld "index" to it
  else
    show fld "IndexFiltered"
    get fld "Index"
    filter it with "*"& me & "*"
    put it into fld "IndexFiltered"
  end if
end keyup

on closefield
  if me is empty then 
    hide fld "indexFiltered"
    show fld "Index"
  else
    show fld "indexFiltered"
    hide fld "Index"
  end if
end closefield

on enterinfield
  find me in fld "script"
end enterinfield

on returninfield
  get me
  find it in fld "object"
  if the foundtext is not me then
    put "'" & me & "' not found"
  end if
end returninfield
<end script>

Courtesy of TAOO libraries'... 

cheers
Xavier
http://monsieurx.com/taoo
 

> -----Original Message-----
> From: use-revolution-bounces at lists.runrev.com 
> [mailto:use-revolution-bounces at lists.runrev.com] On Behalf Of 
> Alex Tweedly
> Sent: Thursday, October 13, 2005 10:49 PM
> To: How to use Revolution
> Subject: Re: Browser Fields
> 
> xbury.cs at clearstream.com wrote:
> 
> >As for incremental searches, it's just a look searching the 
> next word 
> >and adding the findings to the results list. Isn't it? Let 
> me know if 
> >you can't see how it's done...
> >
> >  
> >
> Yes and no.
> 
> >Please explain in what way it is incremental? search words, 
> searching 
> >targets?...
> >  
> >
> I understand "incremental search" to mean that the searching (and
> display) happens in real time as I type the search string. So 
> as soon as I hit "a" it highlights the first (occurrence of 
> an "a"), then when I type "l" it highlights the first 
> occurrence of "al", etc. Examples include emacs (gets it 
> right), Firefox on-page search (gets it wrong, IMO, by not 
> rewinding the search properly if I use backspace to remove 
> parts of the search string), and others. This avoids the 
> problem of having to guess how much of a string is needed to 
> make it relatively unique.
> 
> I especially like the fact that in Emacs you can tell it 
> (ctrl-w) to take the rest of the currently found word, and 
> move that into the search string - this is a big help when 
> searching for calls to functions from a library, for instance.
> 
> And no, I have never written one in Transcript, but often 
> meant to, so I might just have a play with it now ....
> 
> -- 
> Alex Tweedly       http://www.tweedly.net
> 
> 
> 
> --
> No virus found in this outgoing message.
> Checked by AVG Anti-Virus.
> Version: 7.0.344 / Virus Database: 267.11.14/131 - Release 
> Date: 12/10/2005
> 
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage 
> your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution




More information about the use-livecode mailing list