Copying a group does not copy all properties of group items

Igor de Oliveira Couto info at pixelmedia.com.au
Wed Dec 11 17:00:02 EST 2002


Hey, all!

I have been working solidly with Revolution for the last couple of 
days, and have noticed some very, very strange things happening. I was 
wondering whether the more experienced users could shed some light.

I created a stack with several cards. Card 1 has a scrollable list 
field on the left, and a couple of buttons above - one for adding items 
to the list, another for deleting. Every time the user ADDS an item to 
the list, I need a GROUP of objects to be added to the card - these are 
the objects that specify parameters for the item the user has selected 
in the list. Each group has a several fields, a few checkboxes, and a 
radio button sub-group.

Instead of having to setup each new group that is created via script, I 
went to the last card in the stack, and made a 'template' group. This 
group is setup with the appropriate default values for its items (some 
checkboxes are ticked, one of the radio buttons is selected). Back on 
the first card of the stack, all I do in my script is COPY the group 
from the last card to the first, and then rename it, when the user adds 
an item to their list.

The problem: when the template group is copied from the last card to 
the first, the checkboxes and radio button settings are LOST - the 
group appears with all items deselected. Checking the stored value of 
these items' properties by using the messagebox, I see that they are 
either empty, or set to false - even though the group they were 
supposed to be copying had these properties as  'true'. More to the 
point: if I manually (not via script) go to the last card, select the 
group, copy it, go to the first card, and paste it, the items in the 
group KEEP their hilites!

Can anyone tell me what is going on? Will I have to write a script to 
check the hilites, one by one, of all items in the copied group, and 
make sure that they are the same as the original group?

Many thanks,

--
Igor de Oliveira Couto
----------------------------------
igor at pixelmedia.com.au
----------------------------------




More information about the use-livecode mailing list