-
November 21st, 2020, 07:19 #1
Windowlist, creating a "window" on initialization?
What would cause a windowlist to create a object on initializations?
The one thing I could think of would be <createonempty /> but that is not in the windowlist. This windowlist does not have a database/datasource.
Not sure how useful this will be but here is the entry.
Code:<windowlist name="filterlist" > <anchored> <top anchor="top" offset="25" /> <left anchor="left" offset="5" /> <right offset="-20" /> <bottom anchor="bottom" offset="-25" /> </anchored> <frame name="sheetgroup" offset="2,2,2,2" /> <child></child> <child><backcolor>4040301E</backcolor></child> <allowcreate /> <allowdelete /> <empty font="list-empty" gmtextres="filter_npc_emptylist" /> <class>safari_filter_item</class> <sortby><control>filtertype</control></sortby> </windowlist>
For completeness here is the button.
Code:<button_text_sm name="addfilter"> <anchored width="60"> <top anchor="top" offset="5" /> <left anchor="left" offset="5" /> </anchored> <state textres="button_addfilter_text" /> <tooltip textres="button_addfilter_tooltip" /> <script> function onButtonPress() local win = window.filterlist.createWindow(); local aTypes = ManagerSafari.getKeys(win.filtertype.getItems()); win.filtertype.setValue(aTypes[1]) end </script> </button_text_sm>
---
Fantasy Grounds AD&D Reference Bundle, AD&D Adventure Bundle 1, AD&D Adventure Bundle 2
Documentation for AD&D 2E ruleset.
Custom Maps (I2, S4, T1-4, Barrowmaze,Lost City of Barakus)
Note: Please do not message me directly on this site, post in the forums or ping me in FG's discord.
-
November 22nd, 2020, 00:29 #2
Supreme Deity
- Join Date
- Mar 2007
- Posts
- 20,548
Non-database-bound window lists automatically create an empty entry unless you specify the "<skipempty />" tag.
Regards,
JPG
-
November 22nd, 2020, 00:51 #3---
Fantasy Grounds AD&D Reference Bundle, AD&D Adventure Bundle 1, AD&D Adventure Bundle 2
Documentation for AD&D 2E ruleset.
Custom Maps (I2, S4, T1-4, Barrowmaze,Lost City of Barakus)
Note: Please do not message me directly on this site, post in the forums or ping me in FG's discord.
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks