Cosmere RPG Beta Launch
  1. #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"))
    DB.getPath(nodeChar, "abilities." .. sStat .. ".score") value is "charsheet.id-00001.abilities.athletics.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.

  2. #2
    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 4 users browsing this thread. (0 members and 4 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
5E Character Create Playlist

Log in

Log in