Copy Card Unexpected Results

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: Klaus, FourthWorld, heatherlaine, kevinmiller, robinmiller

Post Reply
lgoin
Posts: 26
Joined: Mon May 09, 2011 3:01 pm

Copy Card Unexpected Results

Post by lgoin » Fri Feb 19, 2016 3:58 pm

Hi!
I had an unexpected result when copying a card from one stack to another. I have developed a very complex card (lots of fields, groups, some things hidden etc.) in a stack. I copied this card to my main project stack using "copy this card to stack XXX". When I opened the copied card in the main stack the text in the fields was messed up. It appears that lines of text from one field got randomly placed into other fields including fields that were supposed to be empty. I was able to reset the text and everything is working ok again, but now I don't trust the "copy card" procedure.

Just curious to know if anyone else had similar problems? Or, is there a more reliable way to copy a card from one stack to another? (I'm using LC 7.0.1 OS 10.9.5)

Thanks for your thoughts!
Laura

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7152
Joined: Wed May 06, 2009 2:28 pm
Location: New York, NY

Re: Copy Card Unexpected Results

Post by dunbarx » Fri Feb 19, 2016 4:03 pm

Hi.

I have never seen any issue with this. Does it still happen with the latest stable release of v7?

Craig Newman

lgoin
Posts: 26
Joined: Mon May 09, 2011 3:01 pm

Re: Copy Card Unexpected Results

Post by lgoin » Fri Feb 19, 2016 4:25 pm

Thanks Craig...

I am be switching to 7.1.1 next week (didn't want to introduce new variables during this stage of my development). I'll retest then and update this post.

Thanks!!
Laura

[-hh]
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2262
Joined: Thu Feb 28, 2013 11:52 pm
Location: Göttingen, DE

Re: Copy Card Unexpected Results

Post by [-hh] » Fri Feb 19, 2016 5:16 pm

Hi Laura and Craig,

copying cards between stacks of different sizes was often connected with problems for me. Do you work with equal stack sizes? Especially copying to a stack that is only slightly smaller (and locked) in size may cause visual
"mixing text"-scenes when rects of transparent fields have to be changed by LC.

Meanwhile I use a method that is better controllable:
Copying in the Application browser small clusters of objects, then paste (not there but go to the target stack and paste).
I see problems with stack geometry as a minor bug: One can see the nasty problems to solve for such operations if one tries to do the necessary geometry changes by oneself.

Hermann
p.s. The 7.0 versions had a lot of improvements on their way to 7.1.!!
shiftLock happens

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7152
Joined: Wed May 06, 2009 2:28 pm
Location: New York, NY

Re: Copy Card Unexpected Results

Post by dunbarx » Fri Feb 19, 2016 6:17 pm

Herman.

I have never seen a problem with copying a card to a stack that has a different size. The content is simply either off-screen or occupies a small region of a large card.

Craig

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

Re: Copy Card Unexpected Results

Post by FourthWorld » Fri Feb 19, 2016 7:08 pm

Laura, you may want to double-check the sharedText property of the field, and perhaps also the backgroundBehavior property of the group they'e in if they're part of a group.
Richard Gaskin
Community volunteer LiveCode Community Liaison

LiveCode development, training, and consulting services: Fourth World Systems: http://FourthWorld.com
LiveCode User Group on Facebook : http://FaceBook.com/groups/LiveCodeUsers/

[-hh]
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2262
Joined: Thu Feb 28, 2013 11:52 pm
Location: Göttingen, DE

Re: Copy Card Unexpected Results

Post by [-hh] » Fri Feb 19, 2016 7:33 pm

Craig,

interesting. Which messages are sent when pasting a card? (Probably Richard thought also of this when speaking of background groups?).
If you define objects relative to the bounds of a resizable stack (or use the geometry manager for that) at what point is this updated when pasting a card? From my tests I can't say, it's varying with all these group/background types that jacque recently described (I can't remember where). I had several times with nested structures a wonderful cluster of objects over the loc of the card, the layers still correct.

I don't believe that Laura did anything "wrong" (except she could next time first paste into a new stack to see what may happen).

It's just a dark thought: "Copy card" isn't any more in the "Object" menu, "Delete card" is still there ...
It's just your aura that you never had problems with that, the engine is afraid of your severe punishment ;-)

Hermann
shiftLock happens

lgoin
Posts: 26
Joined: Mon May 09, 2011 3:01 pm

Re: Copy Card Unexpected Results

Post by lgoin » Sat Feb 20, 2016 5:06 pm

Thanks for the interesting discussion and helpful troubleshooting ideas! With your help I think I have found the culprit... a datagrid field!

I checked stack sizes (they were the same), shared text properties, scripts that might be activated in the pasting process etc. and these made no difference. However, Richard's thought on background scripts made me dig a little deeper. Sure enough, I believe the issue was caused by a group that contained a datagrid field that I was using to create a scroller. When I deleted the datagrid group and copied the card the text problem did not happen. I tried copying the datagrid substack before and after the pasting the card, but that didn't make a difference.

Thanks again!
Laura

Post Reply

Return to “Getting Started with LiveCode - Experienced Developers”