Page 1 of 1

Setting hilite property of a button in the main Stack from a subStack

Posted: Thu Mar 04, 2021 1:46 am
by trags3
I Have a Main Stack that at the end of the app gets saved as a PDF file.
There is a sub stack that provides the user the ability to enter data into the Main stack.
I need to coordinate a few check boxes between the 2 stacks.
In the sub stack when a checkbox is selected or deselected I want a corresponding checkbox on a card in the main stack to mirror it.

Code: Select all

repeat with n=1 to 6
      --the fields are named odocs1 thru odocs6 on both cards
      put odocs & n into tbtn
      if the hilite of tbtn  then
          set the hilite of tbtn of cd "4" of stack"MainStack" to true
      end if
  end repeat
I have tried dozens of variations to no avail. Maybe it can't be done?

Tom

Re: Setting hilite property of a button in the main Stack from a subStack

Posted: Thu Mar 04, 2021 2:35 am
by dunbarx
Hi.

A quick glance at your handler shows issues. For example:

Code: Select all

if the hilite of tbtn  then
Think about this. You are inquiring of LC for the hilite of, say, "adocs3".

You probably intended to inquire about the hilite of BUTTON "adocs3", right?

I bet the other issues in your code have similar problems.

Craig