FG Spreadshirt Swag
  1. #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>
    This seems to create a item in the windowlist. The only "createWindow()" for this windowlist is a button press, not an onInit.

    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.

  2. #2
    Non-database-bound window lists automatically create an empty entry unless you specify the "<skipempty />" tag.

    Regards,
    JPG

  3. #3
    Quote Originally Posted by Moon Wizard View Post
    Non-database-bound window lists automatically create an empty entry unless you specify the "<skipempty />" tag.

    Regards,
    JPG
    Ah! Thanks, I was hoping I had missed something.
    ---
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
DICE PACKS BUNDLE

Log in

Log in