Page 1 of 1

Clone Stack problems

Posted: Thu Mar 18, 2010 4:21 pm
by ale870
Hello,

I'm cloning a stack, since I need to create an exact copy of a substack. Now I found to big problems:

1) New stack created (cloned) is a main stack.
2) New stack created (cloned) has the same ID of the original substack!

It means I cannot assign the new stack as a substack (change "mainStack" property).

Please help me since I cannot continue to work, and this is a key-feature for me!

Thank you for your help.

Re: Clone Stack problems

Posted: Thu Mar 18, 2010 8:41 pm
by bn
ale870,
although I dont quite understand what you are doing, you can change the id of a stack,

Code: Select all

set the id of stack "Copy of s2" to 11111
maybe that helps
regards
Bernd

Re: Clone Stack problems

Posted: Thu Mar 18, 2010 10:18 pm
by ale870
Thank you!
I tried reassign the code but I could not do that.
Now I tried again and I found that I assigned low numbers (RunRev requires an ID bigger than the current id number).
Now as workaround I'm using altid.

Thank you for your tip!

Re: Clone Stack problems

Posted: Thu Mar 18, 2010 10:18 pm
by ale870
Thank you!
I tried reassign the code but I could not do that.
Now I tried again and I found that I assigned low numbers (RunRev requires an ID bigger than the current id number).
Now as workaround I'm using altid.

Thank you for your tip!

Re: Clone Stack problems

Posted: Thu Mar 18, 2010 10:20 pm
by ale870
Thank you!
I tried reassign the code but I could not do that.
Now I tried again and I found that I assigned low numbers (RunRev requires an ID bigger than the current id number).
Now as workaround I'm using altid.

But the main problem is not solved (cloning stack RunRev does not generate a correct ID).

Thank you for your tip!

Re: Clone Stack problems

Posted: Fri Mar 19, 2010 6:16 pm
by mwieder
I also don't understand what you're trying to do or why you have a problem.

clone stack "mySubStack"
set the name of it to "myNewSubStack"
set the mainstack of stack "myNewSubStack" to "myMainStack"

Does that not do what you want? Why do you care about the id of the substack?

Re: Clone Stack problems

Posted: Fri Mar 19, 2010 6:26 pm
by ale870
Because it seems RunRev 4.5-dp3 create a new stack with the same id of the old one, and when I refer to it, RunRev cannot manage it since the IDs are the same :-(

Re: Clone Stack problems

Posted: Fri Mar 19, 2010 6:46 pm
by mwieder
You shouldn't be referring to stacks by id. Ever. A new stack will *always* have an id of 1002. The code I posted works fine. Rev has no problems accessing substacks, even with the same id. The problem is with your code.

Re: Clone Stack problems

Posted: Fri Mar 19, 2010 7:00 pm
by ale870
My code is ok, since I changed working mode from stack name to stack altId, and now everything works.
I think there could be some problems in the new beta release 4.5 dp-3.

Thank you.

Re: Clone Stack problems

Posted: Fri Mar 19, 2010 7:08 pm
by mwieder
Stack name should still work fine.

But yes, there are major problems with 4.5dp3. As there were with dp2. They're both beta - if you find problems, you should log them in the QCC.