Cloning Substack in Other Stack

Anything beyond the basics in using the LiveCode language. Share your handlers, functions and magic here.

Moderators: heatherlaine, Klaus, FourthWorld, robinmiller, kevinmiller

Post Reply
mrcoollion
Posts: 261
Joined: Thu Sep 11, 2014 1:49 pm
Location: The Netherlands

Cloning Substack in Other Stack

Post by mrcoollion » Tue Jun 27, 2017 7:49 pm

I have the following issue.

I made a new Calendar Pane because I found the CalendarPane i downloaded (http://www.rotundasoftware.com/livecode ... arPane.php) to hard to mold into what I wanted to do with it.
My version is a substack and has all sorts of possibilities and even for a low level developer as me is easy to work with so I though. Why not share it on this forum.

My problem is that when i want to clone this substack and place it under a new mainstack all sorts of things are wrong.
The complete layout e.g.

Any way to easy clone a substack to another mainstack or am i doing anything wrong.

I use

Code: Select all

clone stack "myStack"
Regards,

Paul

mrcoollion
Posts: 261
Joined: Thu Sep 11, 2014 1:49 pm
Location: The Netherlands

Re: Cloning Substack in Other Stack

Post by mrcoollion » Tue Jun 27, 2017 8:25 pm

Found out that if I use

Code: Select all

clone stack "NameOfOriginalSubstack" as "NameOfNewSubstack"
in the MessageBox window al goes as expected.

Regards,

Paul

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 5218
Joined: Wed May 06, 2009 2:28 pm
Location: New York, NY

Re: Cloning Substack in Other Stack

Post by dunbarx » Tue Jun 27, 2017 10:50 pm

Not sure what you mean, but know that the mainstack of a stack is a property of that stack, and can be set to any stack. See the dictionary, because changing a mainstack may change the file to which it belonged.

Craig Newman

mrcoollion
Posts: 261
Joined: Thu Sep 11, 2014 1:49 pm
Location: The Netherlands

Re: Cloning Substack in Other Stack

Post by mrcoollion » Wed Jun 28, 2017 8:53 pm

Hi Craig,

I got it working without a problem..

Code: Select all

clone stack "DemoFlexCalendar" as tNewCalendarStackName
works fine.

I used this to make a flexible calendar pane which i will post in a new post for all to use, improve and maybe someone can make a widget of it?

Thanks....

Post Reply

Return to “Talking LiveCode”