Value of the SelectedLine

Eric Chatonet eric.chatonet at sosmartsoftware.com
Fri Apr 18 12:06:56 EDT 2008


Bonjour Gregory,

Le 18 avr. 08 à 17:39, Gregory Lypny a écrit :

> Hello everyone,
>
> When I type
> 	
> 	put the value of the selectedLine of fld "X" of stack "S"
>
> into the message box, I get a result.  But when I place it in the  
> button of stack Z, I get nothing.  Why is that?
>
> 	Gregory

Actually, selectedLine, like clickLine, foundLine, mouseLine or  
selectedChunk, selectedField do not accept a 'of something' contrary  
to selectedText or hilitedLine.
The message box tries to evaluate an expression and in this case it  
works because the code used in revExecuteMessage (in the message box  
code) set the defaultStack to the current defaultStack.
So this means that if you put into your button:

Set the defaultStack to "S"
put the value of the selectedLine of fld "X" of stack "S"

It will work but it's not correct because of the 'of something' I  
said above and the engine will ignore this 'of fld "X" of stack "S"'
So prefer to use:

put the selectedText of fld "X" of stack "S"

Hope this clarifies.

Best regards from Paris,
Eric Chatonet.
----------------------------------------------------------------
Plugins and tutorials for Revolution: http://www.sosmartsoftware.com/
Email: eric.chatonet at sosmartsoftware.com/
----------------------------------------------------------------





More information about the use-livecode mailing list