Edit Group problem

Ken Ray kray at sonsothunder.com
Tue Oct 21 21:38:44 EDT 2003


Graham,

First of all, I would avoid editing the group and just address items in
the group directly if you can. For example, if you do:

  delete image "face.gif" of grp "TheGroup"

you don't need to be in "editing" mode to do it; you can be just "on the
card" with the browse tool when the command executes and it will work. 

However, to get new images *into* a group from the clipboard, there's
not much more you can do that what you're already doing unless you know
the dimensions of the image (width and height) ahead of time.

Ken Ray
Sons of Thunder Software
Email: kray at sonsothunder.com
Web Site: http://www.sonsothunder.com/ 


> -----Original Message-----
> From: use-revolution-bounces at lists.runrev.com 
> [mailto:use-revolution-bounces at lists.runrev.com] On Behalf Of 
> Graham Samuel
> Sent: Tuesday, October 21, 2003 1:38 PM
> To: Revolution user discussion
> Subject: Edit Group problem
> 
> 
> I'm experimenting to see how easy it is to add items to a group 
> temporarily (to facilitate moving the items round the screen 
> together, either by script of by the user dragging them and the group 
> reacting to a 'grab' command) and later removing the items again. 
> I've succeeded in adding an image to the group by :
> 
> on mouseUp
>    copy image "face.gif"
>    start editing grp "TheGroup"
>    paste
>    set the bottom of image "face.gif" to the bottom of grc "Graphic 2"
>    -- the above line refers to objects inside the group
>    stop editing background "TheGroup"
> end mouseUp
> 
> However, when I want to get rid of the new item from the group, this 
> script (in another button) doesn't work.
> 
> on mouseUp
>    start editing grp "TheGroup"
>    delete image "face.gif" of grp "TheGroup"
>    stop editing background "TheGroup"
>    paste
> end mouseUp
> 
> Not only does the image not get deleted, but the whole display seems 
> to stay in 'group edit' mode until I switch from browse to select 
> mode and back in the IDE's tool palette. I tried just doing
> 
>    delete image "face.gif"
> 
> even though I could see this might have picked up the wrong copy of 
> the image, but anyway it didn't work either.
> 
> It all works perfectly well in the IDE, using the tools provided and 
> selecting the image via the mouse.
> 
> Can't see what I'm doing wrong.
> 
> TIA
> 
> Graham
> 
> BTW I find it kind of odd that I have to use the word 'background' in 
> the 'stop editing'but not elsewhere (it's in the TD).
> -- 
> -------------------------------------------------------------------
>           Graham Samuel / The Living Fossil Co. / UK & France 
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com 
> http://lists.runrev.com/mailman/listinfo/use-> revolution
> 




More information about the Use-livecode mailing list