filter list help
alex at tweedly.net
Mon Jan 10 19:14:10 EST 2005
Alex Tweedly wrote:
> Yes, I think it does, indirectly.
> "the hilitedLine" gives the line number of the selected line within
> the field - so basically what you are doing is requiring that the
> lines of the list are in corresponding order with the cards.
> You might be better to either name the cards to match the list items,
> or to have a variable (customProperty ?) which contains ALL the item
> names and the corresponding card numbers (or names). Then you could
> use the selectedText (or the chunk expression for the line) to select
> the relevant entry.
> Say ,
> (somewhere in initialization code)
> -- Store all command names in card order
> set the cCommandNames to "Scale,Other,Descale,Descaled,etc."
> and in the listfield
> on mouseDoubleUp
> if the hilitedLine is not empty then
> put the hilitedLine of me into myVar
> put itemOffset(myVar, sCommandNames) into tCardNumber
> if tCardNumber > 0 then go card tCardNumber
> end if
> end mouseDoubleUp
Sorry Bob - I had two ideas in mind and managed to mangle them together
to give an incomplete answer.
This should have read ....
if the hilitedLine is not empty then
put the hilitedLine of me into tLineNumber
put line tLineNumber of me into tTheText
put itemOffset(tTheText, sCommandNames) into tCardNumber
if tCardNumber > 0 then go card tCardNumber
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.300 / Virus Database: 265.6.9 - Release Date: 06/01/2005
More information about the Use-livecode