Thread: WindowInstance createControl
-
Yesterday, 20:34 #1
WindowInstance createControl
Hi there,
I have an issue with the createControl command. I create a control with the following command.
Code:_ctrlDiceTestField = window.createControl("dicefield_ability", sControlName, DB.getPath(nodeChar, "abilities." .. sStat .. ".score"))
However, when I fetch the path of the control with "Debug.chat("Path self", _ctrlDiceTestField.getDatabaseNode())", it shows "charsheet.id-00001.skilllist.id-00072.charsheet.id-00001.abilities.athletics.score", i.e. it adds the window DB path to the path I hand over during creation.
I'm lost on how to assign the DB path "charsheet.id-00001.abilities.athletics.score" only to the field.
-
Yesterday, 20:48 #2
Supreme Deity
- Join Date
- Mar 2007
- Posts
- 21,069
The source parameter expects the relative source path, not an absolute source path. If it's not relative, you won't be able to use the source parameter. It looks like in this case, you will not be able to use that.
Instead, you'll need to set up a DB handler on DB.getPath(nodeChar, "abilities.*.score") that triggers an update for whatever logic you had depending on that control.
Regards,
JPG
Thread Information
Users Browsing this Thread
There are currently 3 users browsing this thread. (0 members and 3 guests)
Bookmarks