Page 1 of 1

[Solved] Moving group problem

Posted: Tue Nov 21, 2017 11:12 pm
by bogs
I thought I understood groups, and the path, but apparently no so much.

I have a group of images I have been using in a project on a subStack. I had later decided (but of course, not before assigning all the images over a LOT of cards of the mainStack) to put the group on a card in the mainStack. I am finding this to be more difficult than I thought initially. Some mistakes in my assumptions were -
. I thought a 'shared' group, no matter its location, was shared throughout the project so that, lets say you copied or cut the group, then pasted it, the items inside would retain their ID. Turns out this is incorrect.
. I thought that a shared group, even on a substack, would still follow the message path of card -> substack -> mainstack (it does, kinda, if I assign a button icon by id of the group, it works), but I am unable to use the place command to place the group on a card in the mainstack.
. I thought I should be able to drag the card the group is on from the substack to the mainstack without changing the IDs, but this is also incorrect.

I am really not looking forward to actually going through each of the cards and manually changing the icon IDs for each button, but that is where I am at at the moment, so in desperation. and after many searches for what I am missing, I am reaching out to see if anyone has a suggestion or method to move a shared group from a card in a substack to the mainstack without changing the IDs of all the images in the group, or alternately, an explanation of why something that seems so simple actually is not :| (See Craig, my brother, your not the only one that comes up with these lu-lu things :D )

Re: Moving group problem

Posted: Wed Nov 22, 2017 1:13 am
by dunbarx
Bogs.

Sharing is within a stack or substack. It follows the HC paradigm, somewhat, of an actual distinct object class, lying between the card and the stack. As such, it does not know or care about other stacks or substacks.

As such again, your
follow the message path of card -> substack -> mainstack
needs to place the shared (backGround behavior set) group between the card and the stack.
I thought I should be able to drag the card the group is on from the substack to the mainstack
Um, nope. You can copy cards from one place to another, though.


Craig Newman

Re: Moving group problem

Posted: Wed Nov 22, 2017 3:30 am
by bogs
dunbarx wrote:
Wed Nov 22, 2017 1:13 am
Sharing is within a stack or substack. It follows the HC paradigm, somewhat, of an actual distinct object class, lying between the card and the stack. As such, it does not know or care about other stacks or substacks.
Yah, that is pretty much the wall I'm running into now. Sure makes me wish I had spent more time playing with Hypercard when it had come out.
You can copy cards from one place to another, though.
Yes, I can even copy the group from one stack to the other. I can understand it changing the picture IDs on copy, since there is now 2 of the same picture. The thing that stump(s) me though, is that even if I cut the pictures and then paste them, the IDs still change! I mean, that should be a one to one replacement, shouldn't it ? I have to admit, I am having a hard time understanding that one :(

Re: Moving group problem

Posted: Wed Nov 22, 2017 3:36 am
by dunbarx
Someone like Jacque or Klaus will know better, But I think in any single session, deleting a control also sets its ID aside so It cannot be used again.

I might be wrong about that.

Craig

Re: Moving group problem

Posted: Wed Nov 22, 2017 5:25 pm
by jacque
I am reaching out to see if anyone has a suggestion or method to move a shared group from a card in a substack to the mainstack without changing the IDs of all the images in the group, or alternately, an explanation of why something that seems so simple actually is not
Every stack maintains its own set of IDs. It has to, because pasting in a control could easily have the same ID as another existing control in the target stack. That would create ID conflicts and some very unexpected results.

LC maintains a list of reserved icon IDs (I think it's in the icon entry in the dictionary) and if you want to share icons across many stacks it's wise to assign the images very high IDs that are unlikely to be used elsewhere. Store the images somewhere in the mainstack (an unused card, an unplaced group, etc). Then you can assign those icons to the controls in the group and they should be found when you copy the group elsewhere, provided the containing stack is in the search path. I generally start my custom ID numbers at 300,000.

Re: Moving group problem

Posted: Wed Nov 22, 2017 5:39 pm
by jacque
dunbarx wrote:
Wed Nov 22, 2017 3:36 am
Someone like Jacque or Klaus will know better, But I think in any single session, deleting a control also sets its ID aside so It cannot be used again.

I might be wrong about that.
That's right, but it isn't just for the session, it's forever. IDs are used once per stack. When they're gone, they're gone.

Every stack starts with an ID of 1001 and counts up from there. BTW, if you renumber IDs as I suggested, the IDs for any new controls will begin counting up from there. IDs only march forward.

Re: Moving group problem

Posted: Wed Nov 22, 2017 6:50 pm
by bogs
Thank you both so much for correcting my profound lack of understanding, now at least I get it, and I am sure I will not forget it.