Using substacks as libraries
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Using substacks as libraries
I've been struggling with trying to pull other open source code such as fastjson but keep running into issues calling the handlers.
I created a substack "fastjson" and put the code as directed. Within the stack script within preOpenStack, I specified start using stack "fastjson" but whenever I try to call the functions from cards within the main stack I get issues.
I've looked and seen multiple examples but hoping someone could show me an example or if there is a better way of creating libraries to include for other stacks/cards.
I created a substack "fastjson" and put the code as directed. Within the stack script within preOpenStack, I specified start using stack "fastjson" but whenever I try to call the functions from cards within the main stack I get issues.
I've looked and seen multiple examples but hoping someone could show me an example or if there is a better way of creating libraries to include for other stacks/cards.
-
- VIP Livecode Opensource Backer
- Posts: 10052
- Joined: Sat Apr 08, 2006 7:05 am
- Contact:
Re: Using substacks as libraries
What specific issues do you get?
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
Re: Using substacks as libraries
I use the stack within the card script, and then within a button click I call jsonToArray.
button "Button": execution error at line 2 (Handler: can't find handler) near "jsonToArray", char 1
button "Button": execution error at line 2 (Handler: can't find handler) near "jsonToArray", char 1
-
- VIP Livecode Opensource Backer
- Posts: 10052
- Joined: Sat Apr 08, 2006 7:05 am
- Contact:
Re: Using substacks as libraries
Run this in the Message Box and see if the stack in there (and spelled as expected):
Code: Select all
put the stacksInUse
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
Re: Using substacks as libraries
Trying stacksInUse is empty, but if I do libraries it shows the one I want.
-
- VIP Livecode Opensource Backer
- Posts: 10052
- Joined: Sat Apr 08, 2006 7:05 am
- Contact:
Re: Using substacks as libraries
That's weirder than I have words for. The stacksInUse produces a list of active libraries.
Well, at least in this dimension.
Where are you getting that library list?
Well, at least in this dimension.
Where are you getting that library list?
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
Re: Using substacks as libraries
I'm sorry about that, I redid what you said and it worked this time because I capitalized it correctly. It also finally started working but not entirely sure what I did this time to get it to work...
-
- VIP Livecode Opensource Backer
- Posts: 10052
- Joined: Sat Apr 08, 2006 7:05 am
- Contact:
Re: Using substacks as libraries
That's the magic of programming.tpflueger wrote:not entirely sure what I did this time to get it to work...


Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn