Using 'common' objects across multiple cards

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7237
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: Using 'common' objects across multiple cards

Post by jacque » Tue Nov 16, 2021 9:38 pm

In that case I'm not surprised LC is confused. I think your best bet is to start over. But you could copy/paste most of the controls, including those inside the group, into a new stack to save some time. Don't copy the whole group, just the controls it contains. Then in the new stack, select them and group them.

I confess I've never seen duplicate IDs like that before, except in cases where the user has manually (and mistakenly) changed them. But there's no interface for changing a group ID, it requires the message box, so something bizarre happened.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9842
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: Using 'common' objects across multiple cards

Post by FourthWorld » Wed Nov 17, 2021 1:48 am

gilgml wrote:
Tue Nov 16, 2021 8:18 pm
@jacque
Just for the record because i told you it was only the beginning of a project, so don't waste time please, both IDs are the same !
hovering first line.pnghovering 2nd line.png
And the same for 'duplicate' buttons, they share the same ID ( ex 1028 of group 1021 of card 1002 of stack Xxx )

Have a good evening
If you add a button to one of those groups, does the other remain unchanged?
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

gilgml
Posts: 26
Joined: Wed Jun 16, 2021 3:35 am

Re: Using 'common' objects across multiple cards

Post by gilgml » Fri Nov 19, 2021 12:31 am

Thanks for taking care.
How can i add a button to a group ?

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7237
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: Using 'common' objects across multiple cards

Post by jacque » Sat Nov 20, 2021 5:22 am

gilgml wrote:
Fri Nov 19, 2021 12:31 am
How can i add a button to a group ?
Select the whole group. Click the Edit Group button in the LC toolbar at the top. The screen will change and you will only see the controls that are in the group. Drag a button to the group and edit it if you want. When you are done, click the same toolbar button to stop editing the group. The screen will change again so you can see everything on the card.

If the toolbar button Select Grouped is selected, you can edit the button or any other control inside the group without choosing to edit the whole group again. Or you can just select the button in the project browser.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

gilgml
Posts: 26
Joined: Wed Jun 16, 2021 3:35 am

Re: Using 'common' objects across multiple cards

Post by gilgml » Sat Nov 20, 2021 11:58 am

Thank you.
I understand the way to do it generally speaking, but when using the ide, i cannot see what you mean : After having clicked on "Edit Group" only the group stay visible, but the button to add to the group is no more here ! so i cannot "Drag a button to the group and edit it if you want" ! :(

gilgml
Posts: 26
Joined: Wed Jun 16, 2021 3:35 am

Re: Using 'common' objects across multiple cards

Post by gilgml » Sat Nov 20, 2021 12:06 pm

Okay, i found how to do it. Copy the button to add, then, while in edit group mode, Edit menu then 'paste objects'. Then stop editing group.
Now i've got to proove that the adjonction of this new object in the group is reflected on other cards.
But the way to do it is understood.

Thank you for taking care :lol:

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7237
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: Using 'common' objects across multiple cards

Post by jacque » Sat Nov 20, 2021 6:32 pm

Sorry, I should have said to drag a button from the tool palette. If you already had a button then you did it the right way. Glad you are making progress!
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

Post Reply

Return to “Getting Started with LiveCode - Complete Beginners”