Joshua Stream Pre
  1. #1
    celestian's Avatar
    Join Date
    Jan 2017
    Location
    DFW, Texas
    Posts
    3,144

    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 Content Bundle (All The AD&D Content)
    Coding the Official AD&D Ruleset
    Documentation for AD&D 2E ruleset.
    My Twitch Channel for AD&D and FG related streams (See schedule for live days)
    My YouTube for FG related Tutorials and AD&D Actual Plays
    Custom Maps (I2, S4, T1-4, Barrowmaze,Lost City of Barakus)

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

    Regards,
    JPG

  3. #3
    celestian's Avatar
    Join Date
    Jan 2017
    Location
    DFW, Texas
    Posts
    3,144
    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 Content Bundle (All The AD&D Content)
    Coding the Official AD&D Ruleset
    Documentation for AD&D 2E ruleset.
    My Twitch Channel for AD&D and FG related streams (See schedule for live days)
    My YouTube for FG related Tutorials and AD&D Actual Plays
    Custom Maps (I2, S4, T1-4, Barrowmaze,Lost City of Barakus)

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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