selectedChunk under Windows

Ken Ray kray at sonsothunder.com
Wed Sep 24 11:22:00 EDT 2003


It is probably the fact that the "traversalOn" of the button is TRUE.
Turn it off and you should be OK. The reason is that if the traversalOn
of the button is true, the field loses its focus when you mouseDown on
the button, so when it runs the mouseUp script, nothing is currently
selected  and hence no selectedChunk.

Ken Ray
Sons of Thunder Software
Email: kray at sonsothunder.com
Web Site: http://www.sonsothunder.com/ 

> -----Original Message-----
> From: use-revolution-admin at lists.runrev.com 
> [mailto:use-revolution-admin at lists.runrev.com] On Behalf Of 
> Kjetil Rå Hauge
> Sent: Wednesday, September 24, 2003 10:30 AM
> To: use-revolution at lists.runrev.com
> Subject: selectedChunk under Windows
> 
> 
> Is there something special about the 
> selectedChunk under Windows? I have a stack where 
> the user clicks on a word (or a sequence of 
> words) in a locked field, and then on a button to 
> have a given handler operate on the selection. 
> The problem is that the selectedChunk seems to 
> get lost immediately in the Windows build (tested 
> under Windows 2000). For instance, I have a 
> statement to trap for no selection being made:
> 
> if the selectedChunk is empty then
>     answer "First click on a word to be messed around with."
>     exit thisHandler
> end if
> 
> This always evaluates to true, while the Mac OS X 
> build behaves as expected. (And of course if I 
> remove the statement, there is no result from the 
> following statements that should work on the 
> selectedChunk.)
> 
> The button calls a handler in the stack script, 
> and I have tried putting the selectedChunk into a 
> global already in the button script and 
> reselecting it in the stack script, in case 
> Windows releases the selection between the button 
> and the handler, but with the same results. 
> Suggestions are very welcome.
> 
> -- 
> ---
> Kjetil Rå Hauge, U. of Oslo, PO Box 1030 Blindern, N-0315 
> Oslo, Norway Tel. +47/22856710, fax +47/22854140 
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com 
> http://lists.runrev.com/mailman/listinfo/use-> revolution
> 





More information about the use-livecode mailing list