Page 1 of 2
Merging Stacks?
Posted: Mon Dec 07, 2009 5:03 pm
by Ralph Forehand
I have two main stacks "One" and Two".
I want to make stack "Two" a substack of stack "One"?
What procedure do I use?
Re: Merging Stacks?
Posted: Mon Dec 07, 2009 5:34 pm
by bn
Ralph,
go to stack "Two", open the properties inspector, on the basic properties there is an option to choose a main stack for stack "Two"
regards
Bernd
Re: Merging Stacks?
Posted: Mon Dec 07, 2009 6:11 pm
by Ralph Forehand
Thank You very much for your quick reply.
I did as you suggested and saved both stacks
But Stack "Two" does not become a substack of stack "One" and when I reopen stack "Two" it shows itself as the Main Stack.
My stack "Two" is a model DialogBox I want to call in stack "One"
Re: Merging Stacks?
Posted: Mon Dec 07, 2009 6:39 pm
by bn
bn wrote:go to stack "Two", open the properties inspector, on the basic properties there is an option to choose a main stack for stack "Two"
here you choose stack "One" as the mainstack and then you save. Close Rev. Restart Rev. There should not be a stack "two" anymore, because if all went well stack "two" is now a substack of stack "One". It works for me this way. No idea why it is not working for you. Then you tweak your substack to modeless palette toplevel slider or whatever.
regards
Bernd
Re: Merging Stacks?
Posted: Mon Dec 07, 2009 8:45 pm
by Ralph Forehand
Stack "Two" simply refuses to become a substack of main stack "one"
Stack "Two" allows me to change it's main stack to stack "One", save it, restart Rev, but then when I reopen;
stack "Two" it' s main stack still shows as :stack "Two"
Stack "One" does not include "Two" as a substack and can not find "Two" on the model stack "Two" command
Stack does not vanish.
Thanks for your patience and suggestions.
Re: Merging Stacks?
Posted: Mon Dec 07, 2009 8:55 pm
by bn
Ralph,
again, I just don't know why this happens. Some ideas that don't necessarily apply here: you call your stack "one" and "two". Try to avoid reserved words in naming things. Rev is known to behave funny in this situation. Always use some other notation, never use a reserved word. Also, even if it works and you call that object from a handler and you don't quote your string you might never find out why the handler does not work.
In your case: why dont you start by creating a new stack and then right away a substack from the menu for this new stack. That at least should work. Then you copy/paste the controls from stack "One" and "Two" to the new stack and substack.
regards
Bernd
Re: Merging Stacks?
Posted: Mon Dec 07, 2009 10:17 pm
by Ralph Forehand
Bernd,
Thanks for hanging in there.
I used "One" and "Two" only for my example names, and the actual stack names are legal.
I tried the Main -->> subStack approach and it didn't work out - it does add the subStack to the main stack and I could copy and paste the controls over from my one card Dialog Box - but the main stack model stack call still can't find it. I triple checked the naming too.
Unfortunately, I can't easily redo the main stack as it's very complex with multiple backgrounds, cards, etc.
At this point I'm about to throw in the towel and just use Revs basic Ask and Answer Dialogs as a work-around. Not as elegant as a custom Dialog Box but ,,,,
Thanks Again for you help, Have a nice Holiday Season and TAKE CARE,
Ralph
Re: Merging Stacks?
Posted: Mon Dec 07, 2009 10:34 pm
by FourthWorld
If all else fails you could make a clone of the stack you want to be your mainstack, save it so it has a file name, and set the mainstack of the other one to the newly-saved mainstack.
Re: Merging Stacks?
Posted: Tue Dec 08, 2009 1:41 pm
by Ralph Forehand
Richard,
Thank You for your suggestion. It didn't work for me though.
My main stack is a converted HyperCard stack and I'm wondering if that has anything to do with it?
Anyway, I haven't totally given up yet but will try a couple more things. It might just be something really simple - ONCE I Find IT!?
Thanks Again and TAKE CARE.
Re: Merging Stacks?
Posted: Tue Dec 08, 2009 2:55 pm
by Klaus
Hi Ralph,
did you really check stack "One" and its SUBSTACKS?
I bet there is a substack "TWO" of stack "ONE"
Setting the mainstack of an open stack does NOT delete the original FILE of that stack!
So if you open the file "TWO.REV" it surely is still its own mainstack!
Best
Klaus
Re: Merging Stacks?
Posted: Tue Dec 08, 2009 4:54 pm
by FourthWorld
At what specific point did it not work?
I do stuff like that all the time, so I know it works.
It won't matter if either of those stacks was originally an HC stack, as long as it's been saved in Rev format first.
Re: Merging Stacks?
Posted: Wed Dec 09, 2009 2:14 am
by Ralph Forehand
Klaus,
Thank You for the info on the subStack status following it's change. All appears as it should now.
Richard,
You are right - your suggestion does work correctly. I had a spelling error leading me to miss-interpret the source of my problem.
Thanks for the method and your affirmation that H/C wouldn't cause me the problem.
Now I'm working on fixing a message path problem.
Thanks Again and TAKE CARE.
Re: Merging Stacks?
Posted: Wed Dec 09, 2009 6:15 am
by FourthWorld
Glad that worked out.
Anything we might be able to help with on the message path issue?
Re: Merging Stacks?
Posted: Wed Dec 09, 2009 2:41 pm
by Ralph Forehand
FourthWorld wrote:Glad that worked out.
Anything we might be able to help with on the message path issue?
Thanks for offering. Yes, all help is appreciated.
My situation is this; I have a main stack #A that consist of several cards.
1. Card #3 has a button "X" script that calls subStack #B (a Dialog Box)
2. subStack #B's "OK" button script builds "myString" that becomes dialogData
3. dialogData is passed back to the button "X" script (So Far So Good)
4. Button "X"'s script manipulates the dialogData cs elements and should end.
BUT gives me an error message;
" executing at 8:42:54 AM
Type Chunk: no such object
Object (main Stack #A)
Line put icon of cd btn "Quarter"-1900 into Quarter
Hint Quarter",
and somehow does not end and tries to execute the main stack "A" script!
I'm missing something (passing a mouseUp??) somewhere?
Thanks for any ides and TAKE CARE.
Re: Merging Stacks?
Posted: Wed Dec 09, 2009 2:58 pm
by Klaus
Hi Ralph,
looks like the script cannot find the desired button, but will, if you add a long descriptor!
Note that, when the script executes, the current card might not contain the button "Quarter"!
...
put the icon of btn "Quarter" OF CD "Name of Card with the button on it" OF STACK "Name of stack with the card with the button on it"...
...
Hope that helps!
Best
Klaus