Combo Button selection affects ALL instances of that button

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
Tom
Posts: 11
Joined: Wed Feb 13, 2008 10:25 pm

Combo Button selection affects ALL instances of that button

Post by Tom » Sat Apr 12, 2008 9:14 pm

The application consists of, among other things, creating new cards for each event.
Each new card (for a new event) contains a number of combo buttons to enable the user to select from the given choices within the combo buttons.
All of these combo buttons are part of a background group, so that when the user creates a new card, all of the combo boxes, and other fields, are displayed on the new card.
Much to my chagrin, I found out that when the combo box choice is changed, it is CHANGED IN EVERY CARD IN THE STACK.
I do NOT want this. What I want is when a combo box selection is made, it holds to that selection for that card only, NOT all previous cards!
I'd really appreciate suggestions on how to accomplish this.

Thanks...Tom

Janschenkel
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 977
Joined: Sat Apr 08, 2006 7:47 am
Contact:

Post by Janschenkel » Sat Apr 12, 2008 10:15 pm

Hi Tom,

The easiest way to accomplish this, is to coy the selection into an invisible field (part of your background group) upon closeCard, and put its content into the combobox upon preOpenCard.
So your background group would have a script like:

Code: Select all

on closeCard
  put the label of button "MyCombobox" into field "MyInvisibleField"
end closeCard

on preOpenCard
  set the label of button "MyCombobox" to field "MyInvisibleField"
end preOpenCard
It's inconvenient, but comboboxes are buttons, not fields - and you have similar issues with checkboxes and radiobutton groups.

Jan Schenkel
Quartam Reports & PDF Library for LiveCode
www.quartam.com

Post Reply