How to make a custom code library-solved

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
waprothero
Posts: 38
Joined: Tue Sep 20, 2011 5:01 pm
Contact:

How to make a custom code library-solved

Post by waprothero » Thu Jul 18, 2013 11:09 pm

I have a project that is going to get large. I want to have library stacks where I can put my code for general use by my project. How do I set up a stack that sits in the message path of all of my project stacks where I don't have to use "send" to invoke every handler that I want to call? A substack won't sit in the message path of other substacks, so that doesn't fit my need. I see Library stacks in other project, but can't find the recipe to attach them.

I've scoured the docs, probably missed it, but can't find the answer to what I think should be a very simple question.
Last edited by waprothero on Sat Jul 20, 2013 5:08 pm, edited 1 time in total.
Bill Prothero

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10044
Joined: Sat Apr 08, 2006 7:05 am
Contact:

Re: How to make a custom code library

Post by FourthWorld » Thu Jul 18, 2013 11:20 pm

See "start using" in the Dictionary.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

waprothero
Posts: 38
Joined: Tue Sep 20, 2011 5:01 pm
Contact:

Re: How to make a custom code library

Post by waprothero » Fri Jul 19, 2013 12:14 am

Richard: Problem solved.
I was using the message box to invoke the handler. It works when I invoke it on the card that holds the app.
Last edited by waprothero on Fri Jul 19, 2013 12:26 am, edited 2 times in total.
Bill Prothero

jmburnod
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2729
Joined: Sat Dec 22, 2007 5:35 pm
Contact:

Re: How to make a custom code library

Post by jmburnod » Fri Jul 19, 2013 10:07 am

Hi waprothero,
I'am not sure what you mean about library.
You can use a stack to store handlers which you often need.
start using stack "MyLibrary" and all handlers of this stack will be available

Best
Jean-Marc
https://alternatic.ch

waprothero
Posts: 38
Joined: Tue Sep 20, 2011 5:01 pm
Contact:

Re: How to make a custom code library

Post by waprothero » Fri Jul 19, 2013 5:03 pm

I just had a session with this, getting it to work. The problem I was having was when I tried to load a stack using the "open" command, I didn't realize that it required that I put the .livecode extension on the stack name. It would be nice if the docs had an example that showed that it required the actual full filename, path, and extension of the stack.

I got it working, finally.
Bill Prothero

Post Reply