How do I remotely change the selectedText of a button and then save it?

William de Smet wdesmet at wanadoo.nl
Sat Apr 1 01:20:55 EST 2006


Thanks Klaus,

This does what I want but then I lose al the available options in the
'options' btn.
I am making an educational stack with levels. In the teacher part the
teacher can choose the right startinglevel (1.1 to 1.5). After making
the exercise the script needs to update the level automatically so
when the student starts working the next day he starts with the next
level. The teacher must also be able to change the level back again
(and with the script so far I've lost al the available levels). The
teacher part is a different stack because it needs to save data.

Maybe I need to work with checkboxes but that takes more space in the
GUI than an option button? Then you set the hilite to true or false
and check this with scripting.

Anyone else can help me with the option button?

William de Smet





2006/4/1, Klaus Major <klaus at major-k.de>:
> HI William,
>
> > Hi there,
> >
> > I have a btn "options" on card "test" of stack 'B' with 5 options from
> > 1.1 to 1.5 .
> > On stack 'A' I have a 'check' button and I remotely try to change one
> > of the options and then save it. On the 'check' button I use:
> > on mouseUp
> > if field "score" = 5 then set the label of btn "options" of card
> > "test" of stack "B" to "1.2"
> > send mouseup to button "save" of card "test" of stack "B"
> > end mouseUp
> >
> > On the 'save' button I use:
>
> Try this:
>
> ##put the selectedtext of btn "options" into tData
> put the label of btn "options" into tData
>
> > put tData into field "options" of card "test" of stack A.
> >
> > Of course the label is changed into "1.2" but field "options" of card
> > "test" of stack A is not and the options 1.1 to 1.5 are gone in btn
> > "options".
> > I am doing something wrong with the selected text and label in my
> > code.
> > Can anyone help me please?
>
> I guess there is no currently selected text in that button, so the label
> (which is "the selectedtext" of that button acutually) might do the
> trick.
>
> Maybe not  ;-)
>
> > William de Smet
>
> Groetjes
>
> Klaus Major
> klaus at major-k.de
> http://www.major-k.de
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
>
>



More information about the use-livecode mailing list