Moving Groups from one stack/card to other.

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
no1g8tor
Posts: 62
Joined: Fri Nov 23, 2007 3:01 pm

Moving Groups from one stack/card to other.

Post by no1g8tor » Fri Aug 01, 2008 5:16 pm

I have a "group" of fields that are created in a "Results" Card in one stack that gets printed, but I want to be able to display the contents in its format on a card that the user can browse without printing.

There are about 15 cards containing this same group with different data. I want to be able to view the "Group" on a card in another stack.

I know I could use the put command for each field, but I was hoping there is a better way to move Grouped Data between cards/stacks

Thanks

BvG
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 1239
Joined: Sat Apr 08, 2006 1:10 pm
Contact:

Post by BvG » Sat Aug 02, 2008 11:59 am

you can copy groups similar to objects, using the "copy to stack" form. Look the copy command up in the dictionary.
Various teststacks and stuff:
http://bjoernke.com

Chat with other RunRev developers:
chat.freenode.net:6666 #livecode

no1g8tor
Posts: 62
Joined: Fri Nov 23, 2007 3:01 pm

Post by no1g8tor » Mon Aug 04, 2008 8:37 pm

I tried that but it did not copy the data inside? Maybe I was doing something wrong??

The other thing with the copy command is placement. If I just tell it to copy from one card to the other...How do I place the group at a certain location?

Thanks

Again.

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Post by Mark » Mon Aug 04, 2008 9:34 pm

no1g8tor,

Why would you store data in another stack, while it is available in one stack already? Just write a script that retrieves the data as necessary and displays it in the group. Use one card, not 15.

Best,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

no1g8tor
Posts: 62
Joined: Fri Nov 23, 2007 3:01 pm

Post by no1g8tor » Tue Aug 12, 2008 2:04 am

sure I can do that but its a lot of coding since the group has about 60 fields in it.

If I could just say move group from card 1 to results card and when I click the next button it would just remove the current field and grab the group from card 2 and place it and so forth.

Sound much easier that get and put for over 5 fields.

If its possible please let me know how.

Thanks so much

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

Post by Janschenkel » Tue Aug 12, 2008 12:00 pm

When you 'copy' the group, it will wipe out the text unless the 'sharedText' property of the field is set to true.

Now the important question is: are the groups that different on each card, or is it the same group buyt with different text in the fields? If the group is basically the same, consider making it a background group.

And not to beat a dead horse, but why do you want to move the group around instead of just going to the card with the data? Sometimes it's better to review your requirements or user interface than to try and beat your head against the wall...

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

BvG
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 1239
Joined: Sat Apr 08, 2006 1:10 pm
Contact:

Post by BvG » Tue Aug 12, 2008 9:17 pm

For positioning stuff you set the rectangle or location of them. There's also additional properties like topleft, height and their siblings that are of interest.

PS: a group is stuff too.
Various teststacks and stuff:
http://bjoernke.com

Chat with other RunRev developers:
chat.freenode.net:6666 #livecode

no1g8tor
Posts: 62
Joined: Fri Nov 23, 2007 3:01 pm

Post by no1g8tor » Wed Aug 13, 2008 2:01 am

Thanks for the replies. The cards that have the group(s) on it has other information and calc fields the program pulls from. The program produces 15 separate pages of data all in the same format. The pages are raw pages that I can pull data from for print or display. I dont want the end user to see these pages as they also contain fields that I want hidden.

I have created a nice user interface to display the data and make it easy for the end user to navigate. I have it printing nice but also want it to display on screen. Since what I want the user to see is in one group I thought it would just be easy to goto card 1 and grab the goup and place it on the "interface" page and have a back and forward button to scroll through the results(group). I did not want to make it complicated just reduce the amount of put commands.

Thanks for all your help and keep up the great work. If you can further elaborate please do.

Post Reply