Ardem
June 22nd, 2012, 04:22
I am still getting my head wrapped around FG's Database controls. My desire is to create some GM Tools which is for a random weather system and random encounters.
To do this I am creating a new button which launches the 'random' windowclass. (ManagementScript_Desktop.lua)
Upon launching a windowclass, (I am using the foundation charsheet for a simple example) it should create the control class fields automatically.??
So when you modify, in this case, the labelstring is should save it to the DB. The only thing I believe I am missing in all this is whether I have to define the DB or the fields prior, and how to go about this.
The window currently displays, the data field allow entry, however the data on close does not save to the DB.
I know this must be simple to you guys, I have managed to change charsheet data and add fields, but this is different.
<?xml version="1.0" encoding="iso-8859-1"?>
<root version="2.0">
<windowclass name="random">
<frame>charsheet</frame>
<placement>
<size>
<width>525</width>
<height>611</height>
</size>
<position>
<x>410</x>
<y>90</y>
</position>
</placement>
<minimize />
<nodelete />
<playercontrol />
<sheetdata>
<genericcontrol name="overviewframe">
<bounds>15,20,480,70</bounds>
<frame>
<name>sheetgroup</name>
</frame>
</genericcontrol>
<labeledstring name="name" source="random.name">
<anchored>
<to>overviewframe</to>
<position>insidetopleft</position>
<offset>15,10</offset>
<size>
<width>450</width>
<height>20</height>
</size>
</anchored>
<anchorto>overviewframe</anchorto>
<height>20</height>
<label>name</label>
<tabtarget>
<next>race</next>
<prev>appearance</prev>
</tabtarget>
</labeledstring>
<closebutton />
</sheetdata>
</windowclass>
</root>
To do this I am creating a new button which launches the 'random' windowclass. (ManagementScript_Desktop.lua)
Upon launching a windowclass, (I am using the foundation charsheet for a simple example) it should create the control class fields automatically.??
So when you modify, in this case, the labelstring is should save it to the DB. The only thing I believe I am missing in all this is whether I have to define the DB or the fields prior, and how to go about this.
The window currently displays, the data field allow entry, however the data on close does not save to the DB.
I know this must be simple to you guys, I have managed to change charsheet data and add fields, but this is different.
<?xml version="1.0" encoding="iso-8859-1"?>
<root version="2.0">
<windowclass name="random">
<frame>charsheet</frame>
<placement>
<size>
<width>525</width>
<height>611</height>
</size>
<position>
<x>410</x>
<y>90</y>
</position>
</placement>
<minimize />
<nodelete />
<playercontrol />
<sheetdata>
<genericcontrol name="overviewframe">
<bounds>15,20,480,70</bounds>
<frame>
<name>sheetgroup</name>
</frame>
</genericcontrol>
<labeledstring name="name" source="random.name">
<anchored>
<to>overviewframe</to>
<position>insidetopleft</position>
<offset>15,10</offset>
<size>
<width>450</width>
<height>20</height>
</size>
</anchored>
<anchorto>overviewframe</anchorto>
<height>20</height>
<label>name</label>
<tabtarget>
<next>race</next>
<prev>appearance</prev>
</tabtarget>
</labeledstring>
<closebutton />
</sheetdata>
</windowclass>
</root>