PDA

View Full Version : OnCreate?



Oberoten
September 7th, 2008, 13:29
I am using shareable charactersheets. This is quite nice, but clashes a bit with the onInit command. I use a lot of windowlists and want them populated on start. "onInit" almost handles it. But when I close and re-open the sheets, if I have changed them from initial values they go back to those.

Is there no "OnCreation" function or something similar?

- Obe

joshuha
September 7th, 2008, 16:40
I am using shareable charactersheets. This is quite nice, but clashes a bit with the onInit command. I use a lot of windowlists and want them populated on start. "onInit" almost handles it. But when I close and re-open the sheets, if I have changed them from initial values they go back to those.

Is there no "OnCreation" function or something similar?

- Obe

There are different ways to approach this. If its a numberfield you can set it so that if it detects a non-zero (the default value) that it doesn't process whatever code you have set.

As far as windowlists, what I typically do is is get the databasenode and setup events using the onChildAdded and other similar events rather than work on the control level.

Oberoten
September 7th, 2008, 17:33
Glory. :)

I talked to Joshua over MSN and this was the solution he helped me come up with : A invisible field that is set to -1 once the skill has been touched.

If it has no, change if it hasn't set cost field to 5.

- Obe

Very nice and many thanks Joshua.