nwebie question about substacks

Jeanne A. E. DeVoto jeanne at runrev.com
Tue Apr 15 01:35:28 EDT 2003


At 3:21 AM -0700 4/14/03, Esa Kivelä wrote:
>Palette opens ok but when I press buttons how I can code that
>paletets buttons opens main stacks text fields?
>
>Like in the palette is button "Monster" -> I press it and its opens
>main stacks card "Help" txt file called "Monster"?

I'm not sure what you mean by opening the main stack's text fields. Do you
want to show the field, or open it for editing, or what?

You can get the short name of the target in the mouseUp handler of the
button, and use that. Here is an example that shows the field with the same
name in the main stack:

  on mouseUp -- goes in palette stack script
    if word 1 of the name of the target is "button" then
      show field (the short name of the target) \
         of card "Help" of stack (the mainStack of this stack)
    end if
  end mouseUp

--
Jeanne A. E. DeVoto ~ jeanne at runrev.com
Runtime Revolution Limited - Software at the Speed of Thought
http://www.runrev.com/





More information about the use-livecode mailing list