RE: auto searching technique

2006-01-20 Thread FlexibleLearning
Hi Devin,

To automatically display the closest spelt item and hilite  the auto-inserted 
characters, put this in the script of your comboBox  button...

on keyup k
put num of chars of the label of me into  temp
get line lineoffset(CR&last word of the label me, CR&me)  of me
if it <>"" then set the label of me to it
  else beep  # optional
select char (temp +1) to -1 of  me
end keyup

Tested with a 3,000 line menuItem list and seems suitably  responsive.

/H



> -Original Message-
>  From: [EMAIL PROTECTED] 
>  [mailto:[EMAIL PROTECTED] On Behalf Of 
> Devin  Asay
> Sent: Thursday, 19 January, 2006 20:38
> To: How to use  Revolution
> Subject: auto searching technique
> 
> I know  this has been discussed before, but I'm not having any 
> luck in the  archives, and I can't reach Rev Online for some 
> reason. :-(
>  
> Has anyone developed a handler for doing an active search for 
>  a line in a combo box popup while typing in the combo box? So 
> if my  combo box contains a list like this, in alphabetical order:
> 
>  Apple
> Banana
> Cantelope
> Grape
> Kiwi
>  Orange
> Peach
> Pear
> Pineapple
> Plum
>  Raspberry
> Strawberry
> Watermelon
> 
> And I start  typing "p", the list pops up with the first item 
> beginning with "p"  hilited. Or more accurately, the first 
> item beginning with 'p' with  everything after 'p' hilited. 
> Then as I continue to type "pi",  Pineapple is (partially) 
> highlighted. Sort of like auto-complete in a  web browser url 
> field or my Mail program's address field.
>  
> I know this can be done, but it's eluding me at the moment.
>  
> Devin
> 
> Devin Asay
> Humanities Technology and  Research Support Center Brigham 
> Young University
 
___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


RE: auto searching technique

2006-01-19 Thread Lynch, Jonathan
There is a way you can do the same thing on keydown, rather than keyup,
to make it appear a bit more responsive:

Local lastkeys

On Keydown k
  Send "Checkme k" to me in 0 seconds
Pass keydown

On checkme K
  put k after lastkeys
  put the long name of field "fruits" into thelist
  set the hilitedline of thelist to (lineoffset(lastkeys&k, thelist) 
  send "clearme" to me in 3 seconds 
end checkme

on clearme
  put empty into lastkeys
end clearme


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of MisterX
Sent: Thursday, January 19, 2006 4:31 PM
To: 'How to use Revolution'
Subject: RE: auto searching technique

Hi Devin

here's a quicky off the top of my stackhead ;)

-- card script or a field script where you type
local lastkeys

on keyup k
  put k after lastkeys
  put the long name of field "fruits" into thelist
  set the hilitedline of thelist to (lineoffset(lastkeys&k, thelist) 
  send "clearme" to me in 3 seconds
end keyup

on clearme
  put empty into lastkeys
end clearme

cheers
Xavier
http://monsieurx.com

> -Original Message-
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf Of 
> Devin Asay
> Sent: Thursday, 19 January, 2006 20:38
> To: How to use Revolution
> Subject: auto searching technique
> 
> I know this has been discussed before, but I'm not having any 
> luck in the archives, and I can't reach Rev Online for some 
> reason. :-(
> 
> Has anyone developed a handler for doing an active search for 
> a line in a combo box popup while typing in the combo box? So 
> if my combo box contains a list like this, in alphabetical order:
> 
> Apple
> Banana
> Cantelope
> Grape
> Kiwi
> Orange
> Peach
> Pear
> Pineapple
> Plum
> Raspberry
> Strawberry
> Watermelon
> 
> And I start typing "p", the list pops up with the first item 
> beginning with "p" hilited. Or more accurately, the first 
> item beginning with 'p' with everything after 'p' hilited. 
> Then as I continue to type "pi", Pineapple is (partially) 
> highlighted. Sort of like auto-complete in a web browser url 
> field or my Mail program's address field.
> 
> I know this can be done, but it's eluding me at the moment.
> 
> Devin
> 
> Devin Asay
> Humanities Technology and Research Support Center Brigham 
> Young University
> 
> ___
> use-revolution mailing list
> use-revolution@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage 
> your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your
subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


RE: auto searching technique

2006-01-19 Thread MisterX
Hi Devin

here's a quicky off the top of my stackhead ;)

-- card script or a field script where you type
local lastkeys

on keyup k
  put k after lastkeys
  put the long name of field "fruits" into thelist
  set the hilitedline of thelist to (lineoffset(lastkeys&k, thelist) 
  send "clearme" to me in 3 seconds
end keyup

on clearme
  put empty into lastkeys
end clearme

cheers
Xavier
http://monsieurx.com

> -Original Message-
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf Of 
> Devin Asay
> Sent: Thursday, 19 January, 2006 20:38
> To: How to use Revolution
> Subject: auto searching technique
> 
> I know this has been discussed before, but I'm not having any 
> luck in the archives, and I can't reach Rev Online for some 
> reason. :-(
> 
> Has anyone developed a handler for doing an active search for 
> a line in a combo box popup while typing in the combo box? So 
> if my combo box contains a list like this, in alphabetical order:
> 
> Apple
> Banana
> Cantelope
> Grape
> Kiwi
> Orange
> Peach
> Pear
> Pineapple
> Plum
> Raspberry
> Strawberry
> Watermelon
> 
> And I start typing "p", the list pops up with the first item 
> beginning with "p" hilited. Or more accurately, the first 
> item beginning with 'p' with everything after 'p' hilited. 
> Then as I continue to type "pi", Pineapple is (partially) 
> highlighted. Sort of like auto-complete in a web browser url 
> field or my Mail program's address field.
> 
> I know this can be done, but it's eluding me at the moment.
> 
> Devin
> 
> Devin Asay
> Humanities Technology and Research Support Center Brigham 
> Young University
> 
> ___
> use-revolution mailing list
> use-revolution@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage 
> your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution