PDA

View Full Version : Windowlist - change databasenode



Xarxus
March 14th, 2024, 16:22
I have a problem to solve for which I don't know if there is a solution. I have a structure like this:


<my-firstlevel-tag>
<id-00001>
...
<my-secondlevel-tag>
<id-00001> ... </id-00001>
<id-00002> ... </id-00002>
...
</my-secondlevel-tag>
</id-00001>
<id-00002>
...
<my-secondlevel-tag>
<id-00001> ... </id-00001>
<id-00002> ... </id-00002>
...
</my-secondlevel-tag>
</id-00002>
...
<my-firstlevel-tag>

Each my-secondlevel-tag structure has a different number of elements, from 1 to n.

In a window I have a windowlist (myList) which has this databasenode --> my-firstlevel-tag.id-00001.my-secondlevel-tag. If I change
the database to my-firstlevel-tag.id-00002.my-secondlevel-tag using myList.setDatabaseNode( ... ) I get weird results. The list does
not update correctly and the elements multiply.

What am I doing wrong and what else should I do to make it work properly?

Xarxus
March 15th, 2024, 12:09
I identified the problem and it doesn't affect the windowlist, but other fields. I can change the windowlist DB,
but I can't do it to other fields, such as a stringfield.

Has anyone ever done this? If yes, how?

Moon Wizard
March 15th, 2024, 19:24
You can not switch the database node on controls other than windowlist or subwindow.

Regards,
JPG

Mike Serfass
March 18th, 2024, 04:49
Can you give us more context?
If we know what you're trying to accomplish, someone is likely to have an idea.

Xarxus
March 30th, 2024, 16:17
What I'm trying to do is to show in a form values (that can be changed) starting from a selection (windowlist, combo, whatever...)
As Moon as said I can use a subwindow, but I do not find any setDatabaseNode for it. How can I change it?

Maybe it's possible, with the setValue, right?

Trenloe
March 31st, 2024, 00:53
What I'm trying to do is to show in a form values (that can be changed) starting from a selection (windowlist, combo, whatever...)
As Moon as said I can use a subwindow, but I do not find any setDatabaseNode for it. How can I change it?

Maybe it's possible, with the setValue, right?
As per the subwindow documentation, setValue sets the windowclass and database path: https://fantasygroundsunity.atlassian.net/wiki/spaces/FGCP/pages/996645196/subwindow#setValue

Xarxus
March 31st, 2024, 18:53
TY guy!