GMBazUK
June 9th, 2011, 09:16
This ruleset creation game is a lot of fun, but Im still not out of the woods as far as LUA is concerned, and sometimes the wood for the trees, with xml.
Brief description:
On the main page of my character sheet I have a frame called Injuries, which contains information on two types of injuries: Lethal - those that are simply a value (so contained in a numberfield) and Critical, those that have a numerical value and a description.
I have set up a numberfield for the Lethal damage.
I have set up a window list on the charsheet_main that is referenced to a windowclass on the charsheet_listclass.xml and includes everything for the Critical damage windowlist. I have referenced a datasource and the class in the windowlist.So far so good.
Problem:
When I open a new character sheet, the windowlist (for criticals) already has an entry (albeit blank) waiting to be filled in. I thought the windowlist default behaviour was to not generate an entry until requested to do so?
This entry reappears if after deletion, the character sheet is closed and reopened.
My confusion is further confounded...
If I fill out this blank default entry with information, and save the campaign it doesnt show up in the database., and whilst it is remembered on the character sheet for the session, it is lost if the session is closed and the campaign file reloaded.
If I add a second entry to the windowlist on the character sheet the information is stored in the database tree where I would expect it to be, and is remembered between sessions etc...
I have edited out all scripting and so have, what I would consider a fairly simple series of xml controls.
Thank you in advance.
Baz.
Brief description:
On the main page of my character sheet I have a frame called Injuries, which contains information on two types of injuries: Lethal - those that are simply a value (so contained in a numberfield) and Critical, those that have a numerical value and a description.
I have set up a numberfield for the Lethal damage.
I have set up a window list on the charsheet_main that is referenced to a windowclass on the charsheet_listclass.xml and includes everything for the Critical damage windowlist. I have referenced a datasource and the class in the windowlist.So far so good.
Problem:
When I open a new character sheet, the windowlist (for criticals) already has an entry (albeit blank) waiting to be filled in. I thought the windowlist default behaviour was to not generate an entry until requested to do so?
This entry reappears if after deletion, the character sheet is closed and reopened.
My confusion is further confounded...
If I fill out this blank default entry with information, and save the campaign it doesnt show up in the database., and whilst it is remembered on the character sheet for the session, it is lost if the session is closed and the campaign file reloaded.
If I add a second entry to the windowlist on the character sheet the information is stored in the database tree where I would expect it to be, and is remembered between sessions etc...
I have edited out all scripting and so have, what I would consider a fairly simple series of xml controls.
Thank you in advance.
Baz.