>Here's a simple question regarding menuPick and menuHistory usage and syntax.
>
>If I use an option button on the Home stack to keep track of the
>stacks I have been working on so I can select which one to open (like
>a Recent Files feature, on a button instead of from a regular menu),
>how can I set up the returnKey message to open the stack name
>currently displayed on the option button?
>
>I tried using a send menuPick message to the button, but I guess I
>don't understand the correct syntax for it. I think I understand that
>the button's label property is always set to the previously selected
>item; and that its menuHistory property is the line number of that
>item. So I don't understand why the following didn't work:
>
>    get the label of btn "myButton"
>    send send menuPick, it to btn "myButton"
Try:

on returnKey
  open stack (the label of btn "myButton")
end returnKey

>
>Then I experimented with getting the menuHistory and setting the
>menuHistory to it, since I read in the Reference stack that menuPick
>is sent automatically to a button when you set its menuHistory. But
>it doesn't happen if you aren't *changing* the menuHistory value. So
>I had to first set the menuHistory to a dummy line number which
>contained a divider line, which I had scripted to always be just
>before the last item in the list. The following worked fine:
>
>    set the lockScreen to true
>    get the menuHistory of btn "myButton"
>    set the menuHistory of btn "myButton" to \
>       the num of lines of btn "myButton" - 1
>    set the menuHistory of btn "myButton" to it
>
>
>But I'm assuming I'm missing something simple regarding sending the
>menuPick message directly?
>
>Regards,
>
>David
>--
>David Cramer, Process Innovation Evangelist          87-1313 Border Street
>PBSC Computer Training Centres (an IBM company)      Winnipeg MB R3H 0X4
>Corporate Office Research & Development              Canada
>
>This is the MetaCard mailing list.
>Archives: http://www.mail-archive.com/metacard%40lists.best.com/
>Info: http://www.xworlds.com/metacard/mailinglist.htm


Regards, Andu



This is the MetaCard mailing list.
Archives: http://www.mail-archive.com/metacard%40lists.best.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm

Reply via email to