adding to GROUPS - scream time

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, asayd

Post Reply
chris25
Posts: 354
Joined: Tue Oct 08, 2013 9:32 pm

adding to GROUPS - scream time

Post by chris25 » Sun Oct 20, 2013 12:03 pm

This is just not cricket! as the English say - I thought I had this under my belt - obviously not! Every single time I add a new image to a group and make it a part of the group it the new object re-sizes itself to its original dimensions.

What I do:

copy object smiley
go to new card with the two objects on them
select them with the drag mouse frame
group them
click edit group
paste new object smiley
then I did the following things:
A) ungroup two objects, re-select all three - select grouped - group - click edit to return
B) ungroup two objects, re-select all three - group all three first - select grouped - click edit
C) ungroup two objects - select all three again - group - select grouped - click edit

On all three occasions the new object re-sizes itself (one time it actually re-sized the project browser as I was moving the group around and then crashed livecode - but ignore this for now)

So Simon, forgive me, I thought I had this solved, but the PDF does not give any clarity or instructions on how you add objects to a group except to say that you need to lock size and position before moving between cards, but I know that after watching you, you did not need to do this, so I have obviously not written my notes correctly, sorry that I am still on this. I need the step by step instructions from somebody because this is eluding me forever now I need to move on.

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

Re: adding to GROUPS - scream time

Post by FourthWorld » Sun Oct 20, 2013 5:22 pm

The copy command allows you to specify a destination, which not only simplifies operations like this but also maintains the user's data on the Clipboard.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

chris25
Posts: 354
Joined: Tue Oct 08, 2013 9:32 pm

Re: adding to GROUPS - scream time

Post by chris25 » Sun Oct 20, 2013 7:21 pm

Hallo there fourthworld:
"""""The copy command allows you to specify a destination, which not only simplifies operations like this but also maintains the user's data on the Clipboard."""""""
Not making much sense I'm afraid. None of what you say can I see when I copy image from the edit menu, and besides, that does not solve any problems for me I am afraid.

bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3975
Joined: Sun Jan 07, 2007 9:12 pm
Location: Bochum, Germany

Re: adding to GROUPS - scream time

Post by bn » Sun Oct 20, 2013 8:03 pm

Hi Cris,

what Richard says it that you can add objects to a group via the copy command

Code: Select all

copy image 1 to group 1 of card 2
additionally, since you copy, the object is temporarily also stored in the clipBoardData. But only until you or the user does another copy operation.

Actually I did not quite understand what you want to achieve. Especially the resizing business. What is not supposed to resize: the smiley or the group?

Kind regards
Bernd

chris25
Posts: 354
Joined: Tue Oct 08, 2013 9:32 pm

Re: adding to GROUPS - scream time

Post by chris25 » Sun Oct 20, 2013 8:25 pm

Hallo Bn, the smiley image comes in at a big size, I then re-size it smaller. But every time I add to the group the smiley reverts back to its original size, this problem has been plaguing me for a week now, and I can not seem able to solve it.

I did not interpret Richard's comment as using scripting code.

bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3975
Joined: Sun Jan 07, 2007 9:12 pm
Location: Bochum, Germany

Re: adding to GROUPS - scream time

Post by bn » Sun Oct 20, 2013 8:48 pm

Hi Chris,

to finish off the week:

if you resize an image the representation of the image will change but the image itself will stay at the original size. Which I think is a feature, although at first a confusing one. As you found out setting the lockLoc (or lock size) in the inspector prevents the downsized image to go back to its original size when returning to the card it is on.

When I copy a downsized image and copy it manually to a group on a different card the downsized image stays downsized. I don't see where the resizing comes from.
I tried to ungroup the group and regroup it: the image stayed downsized.

But if you want an image that is downsized to stay permanently downsized, even without the lockLoc set to true, then do the following

say your downsized smiley is imgage "smiley" and you are on the card where the image is place.

type into the message box

Code: Select all

set the imageData of image "smiley" to the imageData of image "smiley"
and hit return.
Now (although that command seems paradoxical) image smiley is permanently downsized. Of course now it does not have the bigger version to revert to when you set the lockLoc to false. The downsized version is the only version of the image and no need to lockLoc anymore.

I hope this does not add to the d***** confusion.

Kind regards
Bernd

chris25
Posts: 354
Joined: Tue Oct 08, 2013 9:32 pm

Re: adding to GROUPS - scream time

Post by chris25 » Sun Oct 20, 2013 8:57 pm

Thankyou Bernd, I'll follow this and pray.

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

Re: adding to GROUPS - scream time

Post by FourthWorld » Sun Oct 20, 2013 8:57 pm

Your original post included a script, which is why my reply referenced a way to refine the script with the addition of a "to" clause with the "copy" command.

While using that option will reliably put objects into a group with the extra benefit of leaving the user's Clipboard data intact, the separate issue of images resizing will of course require a separate solution.

Is the lockLoc of the image object set to true? In most cases where image objects resize themselves to the full image size simply setting the lockLoc property after adjusting to the desired size is all that's needed.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

chris25
Posts: 354
Joined: Tue Oct 08, 2013 9:32 pm

Re: adding to GROUPS - scream time

Post by chris25 » Sun Oct 20, 2013 9:04 pm

I originally was doing this very thing many days ago,which is how the issues first began - it did not work, when you set it to lock size and position, suddenly I could not group it, it is un-selectable. Which in retrospect makes sense.

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

Re: adding to GROUPS - scream time

Post by jacque » Mon Oct 21, 2013 6:47 pm

Locked objects can still be selected and worked with normally, their only restriction is that you can no longer drag the handles with the mouse to resize them. Are you sure you didn't set the cantSelect property instead? That does prevent selecting the object.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

chris25
Posts: 354
Joined: Tue Oct 08, 2013 9:32 pm

Re: adding to GROUPS - scream time

Post by chris25 » Mon Oct 21, 2013 7:42 pm

Noooo I would'nt know how, way too advanced for me...anyway this has finally been solved yes I mean solved, a few more successful practise runs today and bob your uncle!

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

Re: adding to GROUPS - scream time

Post by jacque » Mon Oct 21, 2013 8:25 pm

The cantSelect is a button in the Project Browser that appears next to any object. It looks like a padlock and the tooltip is "Make unselectable". You may have clicked it by accident if you were trying to toggle visibility, which is the icon directly above it.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

chris25
Posts: 354
Joined: Tue Oct 08, 2013 9:32 pm

Re: adding to GROUPS - scream time

Post by chris25 » Mon Oct 21, 2013 9:03 pm

Aahh, yes, No i did not click that padlock, was aware of it though. Thanks.

Post Reply

Return to “LiveCode University”