Passing selectedField Location between Stacks

Ken Ray kray at sonsothunder.com
Sat Dec 7 23:11:01 CST 2002


Bernard,

Actually anything that removes the focus from the field will prevent
selectedField or selectedChunk from working. For example if you have on a
single card a field and a button and put text in the field and ask (in the
button script) for the selectedField, you'll get nothing. The reason for
*this* occurrence is because the normal button has its 'traversalOn'
property set to true, which gives the button the focus before it executes
its script. If you turn the 'traversalOn' of the button off, the button can
retrieve the selectedField just fine.

In the case of another stack, if the other stack is a toplevel stack (not a
palette), the focus will shift to the stack. If you have a palette, and the
buttons have their 'traversalOn' set to false, you should be OK.

Hope this helps,

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

----- Original Message -----
From: "Bernard Devlin" <revolution at knowledgeworks.plus.com>
To: "use-revolution" <use-revolution at lists.runrev.com>
Sent: Friday, December 06, 2002 9:31 PM
Subject: Passing selectedField Location between Stacks


> I have two stacks.  Stack T contains text fields, and Stack B contains
buttons.
>
> Whilst typing in Stack T, if the user requires input from Stack B I want
the
> user to be able to just click on an item in Stack B, and have the text
> associated with the clicked button inserted at the place in the field in
Stack T
> where s/he was typing.
>
> My understanding is that it is the use of two stacks that is preventing me
from
> using the selectedField or selectedChunk to determine where the label of
the
> button should be placed.  Is this correct?
> _______________________________________________
> 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