copy group to card

Mark Schonewille m.schonewille at
Mon Apr 7 13:04:31 EDT 2008

Hi Tom,

First of all, why would you want to copy a group? The good thing about  
groups is that you can place them on multiple cards. This means that  
you need only one object, or group of objects, which can save you a  
lot of memory.

Second, if you do this by script, you could send a special message up  
the message hierarchy right before placing the group. If you do this  
manually, no special message is sent. After you have placed the group,  
the selectedObjectChanged message is sent. This might be of help,  
because you could check whether the selectedObject is a group and  
whether it is in a list of previously created groups. Another message  
that is sent if you choose Place from the menu, is the menuPick  
message. I haven't tried whether it is possible to catch this message  
before the group is placed.

If you really want to copy and paste a group manually in the IDE and  
want to handle a message sent before or after pasting, you could  
handle the commandKeyDown message. This even allows you to prevent the  
group from being created.

Best regards,

Mark Schonewille


Economy-x-Talk Consulting and Software Engineering

A large collection of scripts for HyperCard, Revolution, SuperCard and  
other programming languages can be found at

On 7 apr 2008, at 17:12, Thomas McGrath III wrote:
> Is there a message sent when a group has been copied to another  
> card? The key is the Copying part. I am not creating but rather  
> copying.
> I was thinking of something like the "on NewGroup" message where  
> after a group is created the engine sends the NewGroup message in  
> order to act upon the group location, browser tool, etc.
> NewGroup does not specify whether it should work with copy.
> Tom

More information about the Use-livecode mailing list