[noob again]objects and properties and messages
Ken Ray
kray at sonsothunder.com
Mon Mar 28 11:56:20 EST 2005
On 3/28/05 10:29 AM, "Mikey" <mikeythek at gmail.com> wrote:
> Unfortunately this doesn't work when a new card is added to the mix
> and the tab is given the short names of all cards in the stack, since
> you can't go to a card with a name like "card id 387274", and even
> executing there is a card "card id 387274" returns false. Tao it,
> dude.
Are you automating creating tabs? If so, can't you name the tab when you
create the card and *then* put the list of cardnames into the tab button?
> Is there a RR command/function that will tell me which tab was
> selected? I'm writing a handler to figure it out because I don't see
> anything in the docs.
Yes, it's the 'menuHistory'. Think about a tab button like a popup menu
where you can have only one item selected at any given time. The menuHistory
will give you the tab number, and then use this to offset into the data of
the tab button. So suppose you had three tabs: "Apples", "Oranges",
"Bananas", which would mean the tab button has the content:
Apples
Oranges
Bananas
Suppose the third tab is active. If you get the menuHistory of the button,
you'll get "3". So you could say:
put line (the menuHistory of btn "Tabs") of btn "Tabs" into tTabName
and tTabName would be "Bananas".
Ken Ray
Sons of Thunder Software
Web site: http://www.sonsothunder.com/
Email: kray at sonsothunder.com
More information about the use-livecode
mailing list