-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathdataview_tree_loader.livecodescript
37 lines (28 loc) · 1.08 KB
/
dataview_tree_loader.livecodescript
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
script "DataView Tree Assets Loader"
/**
Summary: Used to load the DataView Tree in non-Levure applications.
Description:
Levure applications will load a DataView Tree as a helper and automatically handles
the loading process. This script will do everything manually.
*/
on libraryStack
if the target is not me then pass libraryStack
local tParentFolder
put _parentFolder() into tParentFolder
if there is a stack "DataView Tree Behavior" then
if the environment is "development" then
get there is a stack (tParentFolder & "/" & "ide/row_templates.livecode")
start using stack (tParentFolder & "/" & "ide/ide_library.livecodescript")
end if
load extension from file (tParentFolder & "/" & "tree_lines.lcm")
else
answer "Please assign the stack files in the" && tParentFolder && "folder to the `mainstacks` property of your application stack file."
end if
stop using me
end libraryStack
private function _parentFolder
local tFilename
set the itemdelimiter to "/"
put the filename of me into tFilename
return item 1 to -2 of tFilename
end _parentFolder