GrimmSpector
February 22nd, 2016, 05:45
Getting this error, two files are below, first is the main file, second is the include file, LUA is inline, looks like an issue with it not finding the class I've set up? But it seems fine when I look at it. Probably something silly small again. Hope someone can point out my error, thanks!
Main:
<?xml version="1.0" encoding="iso-8859-1"?>
<!--
Please see the license.html file included with this distribution for
attribution and copyright information.
-->
<root>
<include source="charsheet_listclasses.xml" />
<windowclass name="charsheet_main">
<margins control="0,0,0,2" />
<sheetdata>
<genericcontrol name="attributesframe">
<bounds>15,90,220,200</bounds>
<frame>
<name>sheetgroup</name>
</frame>
<stringcontrol>
<anchored>
<to>attributesframe</to>
<position>insidetopleft</position>
<offset>15,8</offset>
<size>
<width>110</width>
</size>
</anchored>
<font>sheetlabelsmall</font>
<static>Attribute</static>
</stringcontrol>
<stringcontrol>
<anchored>
<to>attributesframe</to>
<position>insidetopleft</position>
<offset>115,8</offset>
<size>
<width>35</width>
</size>
</anchored>
<font>sheetlabelsmall</font>
<static>Score</static>
<center />
</stringcontrol>
<stringcontrol>
<anchored>
<to>attributesframe</to>
<position>insidetopleft</position>
<offset>165,8</offset>
<size>
<width>35</width>
</size>
</anchored>
<font>sheetlabelsmall</font>
<static>Link</static>
<center />
</stringcontrol>
<stringcontrol>
<anchored>
<to>attributesframe</to>
<position>insidetopleft</position>
<offset>205</offset>
<size>
<width>35</width>
</size>
</anchored>
<font>sheetlabelsmall</font>
<static>XP</static>
<center />
</stringcontrol>
</genericcontrol>
<windowlist name="attributes">
<anchored>
<to>attributesframe</to>
<position>over</position>
<offset>-15,-20</offset>
</anchored>
<class>charsheet_attribute</class>
<datasource>.attributes</datasource>
<noscroll />
<script>
STR = nil;
BOD = nil;
RFL = nil;
DEX = nil;
INT = nil;
WIL = nil;
CHA = nil;
EDG = nil;
local order = 1;
function onInit()
STR = addEntry("STR","Strength");
BOD = addEntry("BOD", "Body");
RFL = addEntry("RFL", "Reflex");
DEX = addEntry("DEX", "Dexterity");
INT = addEntry("INT", "Intelligence");
WIL = addEntry("WIL", "Willpower");
CHA = addEntry("CHA", "Charisma");
EDG = addEntry("EDG", "Edge");
applySort();
end
function addEntry(name, label)
local node = getDatabaseNode().getChild(name);
local win = nil;
if not node then
node = getDatabaseNode().createChild(name);
end
for i,w in ipairs(getWindows()) do
if w.getDatabaseNode().getName()==name then
win = w;
end
end
if win then
win.label.setValue(label);
win.order.setValue(order);
order = order + 1;
end
return win;
end
function onSortCompare(w1, w2)
return (w1.order.getValue() > w2.order.getValue());
end
</script>
<skipempty />
</windowlist>
</sheetdata>
</windowclass>
<windowclass name="char_main_category_header">
<margins control="0,0,0,5" />
<frame>rowshade</frame>
<sheetdata>
<genericcontrol name="leftanchor">
<anchored height="0" width="0">
<top offset="5" />
<left offset="10" />
</anchored>
</genericcontrol>
<genericcontrol name="rightanchor">
<anchored height="0" width="0">
<top offset="5" />
<right offset="-10" />
</anchored>
</genericcontrol>
<stringfield name="label">
<anchored>
<top offset="5" />
<left offset="30" />
<right offset="-30" />
</anchored>
<stateframe>
<keyedit name="fieldfocus" offset="7,5,7,5" />
<hover name="fieldfocus" offset="7,5,7,5" hidereadonly="true" />
<drophilight name="fieldfocus" offset="7,5,7,5" hidereadonly="true" />
</stateframe>
<font>reference-b-large</font>
<multilinespacing>20</multilinespacing>
<center />
</stringfield>
</sheetdata>
</windowclass>
</root>
Include:
<?xml version="1.0" encoding="iso-8859-1"?>
<root version="1.0">
<windowclass name="charsheet_attribute">
<sizelimits>
<maximum>
<height>23</height>
</maximum>
<minimum>
<height>23</height>
</minimum>
</sizelimits>
<sheetdata>
<numbercontrol name="order">
<bounds>0,0,0,0</bounds>
<invisible />
</numbercontrol>
<stringcontrol name="label">
<anchored>
<position>insidetopleft</position>
<offset>0,6</offset>
<size>
<width>95</width>
<height>17</height>
</size>
</anchored>
<font>sheetlabel</font>
<static />
</stringcontrol>
<numberfield name="score">
<anchored>
<position>insidetopleft</position>
<offset>100,1</offset>
<size>
<width>35</width>
<height>20</height>
</size>
</anchored>
<font>sheettext</font>
<frame>
<name>modifier</name>
<offset>5,4,5,4</offset>
</frame>
<keyeditframe>
<name>sheetfocus</name>
<offset>5,4,5,4</offset>
</keyeditframe>
</numberfield>
<numberfield name="link">
<anchored>
<to>score</to>
<position>right</position>
<offset>15</offset>
<size>
<width>35</width>
</size>
</anchored>
<font>sheettext</font>
<frame>
<name>modifier</name>
<offset>5,4,5,4</offset>
</frame>
<keyeditframe>
<name>sheetfocus</name>
<offset>5,4,5,4</offset>
</keyeditframe>
</numberfield>
<numberfield name="XP">
<anchored>
<to>link</to>
<position>right</position>
<offset>15</offset>
<size>
<width>35</width>
</size>
</anchored>
<font>sheettext</font>
<frame>
<name>modifier</name>
<offset>5,4,5,4</offset>
</frame>
<keyeditframe>
<name>sheetfocus</name>
<offset>5,4,5,4</offset>
</keyeditframe>
</numberfield>
</sheetdata>
</windowclass>
</root>
Main:
<?xml version="1.0" encoding="iso-8859-1"?>
<!--
Please see the license.html file included with this distribution for
attribution and copyright information.
-->
<root>
<include source="charsheet_listclasses.xml" />
<windowclass name="charsheet_main">
<margins control="0,0,0,2" />
<sheetdata>
<genericcontrol name="attributesframe">
<bounds>15,90,220,200</bounds>
<frame>
<name>sheetgroup</name>
</frame>
<stringcontrol>
<anchored>
<to>attributesframe</to>
<position>insidetopleft</position>
<offset>15,8</offset>
<size>
<width>110</width>
</size>
</anchored>
<font>sheetlabelsmall</font>
<static>Attribute</static>
</stringcontrol>
<stringcontrol>
<anchored>
<to>attributesframe</to>
<position>insidetopleft</position>
<offset>115,8</offset>
<size>
<width>35</width>
</size>
</anchored>
<font>sheetlabelsmall</font>
<static>Score</static>
<center />
</stringcontrol>
<stringcontrol>
<anchored>
<to>attributesframe</to>
<position>insidetopleft</position>
<offset>165,8</offset>
<size>
<width>35</width>
</size>
</anchored>
<font>sheetlabelsmall</font>
<static>Link</static>
<center />
</stringcontrol>
<stringcontrol>
<anchored>
<to>attributesframe</to>
<position>insidetopleft</position>
<offset>205</offset>
<size>
<width>35</width>
</size>
</anchored>
<font>sheetlabelsmall</font>
<static>XP</static>
<center />
</stringcontrol>
</genericcontrol>
<windowlist name="attributes">
<anchored>
<to>attributesframe</to>
<position>over</position>
<offset>-15,-20</offset>
</anchored>
<class>charsheet_attribute</class>
<datasource>.attributes</datasource>
<noscroll />
<script>
STR = nil;
BOD = nil;
RFL = nil;
DEX = nil;
INT = nil;
WIL = nil;
CHA = nil;
EDG = nil;
local order = 1;
function onInit()
STR = addEntry("STR","Strength");
BOD = addEntry("BOD", "Body");
RFL = addEntry("RFL", "Reflex");
DEX = addEntry("DEX", "Dexterity");
INT = addEntry("INT", "Intelligence");
WIL = addEntry("WIL", "Willpower");
CHA = addEntry("CHA", "Charisma");
EDG = addEntry("EDG", "Edge");
applySort();
end
function addEntry(name, label)
local node = getDatabaseNode().getChild(name);
local win = nil;
if not node then
node = getDatabaseNode().createChild(name);
end
for i,w in ipairs(getWindows()) do
if w.getDatabaseNode().getName()==name then
win = w;
end
end
if win then
win.label.setValue(label);
win.order.setValue(order);
order = order + 1;
end
return win;
end
function onSortCompare(w1, w2)
return (w1.order.getValue() > w2.order.getValue());
end
</script>
<skipempty />
</windowlist>
</sheetdata>
</windowclass>
<windowclass name="char_main_category_header">
<margins control="0,0,0,5" />
<frame>rowshade</frame>
<sheetdata>
<genericcontrol name="leftanchor">
<anchored height="0" width="0">
<top offset="5" />
<left offset="10" />
</anchored>
</genericcontrol>
<genericcontrol name="rightanchor">
<anchored height="0" width="0">
<top offset="5" />
<right offset="-10" />
</anchored>
</genericcontrol>
<stringfield name="label">
<anchored>
<top offset="5" />
<left offset="30" />
<right offset="-30" />
</anchored>
<stateframe>
<keyedit name="fieldfocus" offset="7,5,7,5" />
<hover name="fieldfocus" offset="7,5,7,5" hidereadonly="true" />
<drophilight name="fieldfocus" offset="7,5,7,5" hidereadonly="true" />
</stateframe>
<font>reference-b-large</font>
<multilinespacing>20</multilinespacing>
<center />
</stringfield>
</sheetdata>
</windowclass>
</root>
Include:
<?xml version="1.0" encoding="iso-8859-1"?>
<root version="1.0">
<windowclass name="charsheet_attribute">
<sizelimits>
<maximum>
<height>23</height>
</maximum>
<minimum>
<height>23</height>
</minimum>
</sizelimits>
<sheetdata>
<numbercontrol name="order">
<bounds>0,0,0,0</bounds>
<invisible />
</numbercontrol>
<stringcontrol name="label">
<anchored>
<position>insidetopleft</position>
<offset>0,6</offset>
<size>
<width>95</width>
<height>17</height>
</size>
</anchored>
<font>sheetlabel</font>
<static />
</stringcontrol>
<numberfield name="score">
<anchored>
<position>insidetopleft</position>
<offset>100,1</offset>
<size>
<width>35</width>
<height>20</height>
</size>
</anchored>
<font>sheettext</font>
<frame>
<name>modifier</name>
<offset>5,4,5,4</offset>
</frame>
<keyeditframe>
<name>sheetfocus</name>
<offset>5,4,5,4</offset>
</keyeditframe>
</numberfield>
<numberfield name="link">
<anchored>
<to>score</to>
<position>right</position>
<offset>15</offset>
<size>
<width>35</width>
</size>
</anchored>
<font>sheettext</font>
<frame>
<name>modifier</name>
<offset>5,4,5,4</offset>
</frame>
<keyeditframe>
<name>sheetfocus</name>
<offset>5,4,5,4</offset>
</keyeditframe>
</numberfield>
<numberfield name="XP">
<anchored>
<to>link</to>
<position>right</position>
<offset>15</offset>
<size>
<width>35</width>
</size>
</anchored>
<font>sheettext</font>
<frame>
<name>modifier</name>
<offset>5,4,5,4</offset>
</frame>
<keyeditframe>
<name>sheetfocus</name>
<offset>5,4,5,4</offset>
</keyeditframe>
</numberfield>
</sheetdata>
</windowclass>
</root>