PF2E Playlist
  1. #1

    How to limit the <windowlist> to single item?

    Is there a way to enforce limits of <windowlist> to single item?
    The past is a rudder to guide us, not an anchor to hold us back.

  2. #2
    Yes, do a check when a new entry is made and see if the windows would exceed your desired amount. If so, return false.
    Dominic Morta
    Ruleset Developer
    Smiteworks

    How to zip up your campaign if the Developers ask for it-How to zip up your campaign if the Developers ask for it

    How to provide an Unity Connection issue?-Connection Issues and What to Provide

    Unity Updater issue?-Updater Issues

    Classic and Unity Port Forwarding?-Fantasy Grounds Connections Explained

    Comcast or Cox ISP User?-Comcast XFinity and Cox Users

    Have a suggestion?-Idea Informer

  3. #3
    My suggestion is that you really don't want to do this; because it's not the right type of control for the situation. If you simply need an embedded window; then use a subwindow instead.

    Regards,
    JPG

  4. #4
    What I am trying to achieve is to have similar to the party sheet's order tab, where PC can be dragged & dropped but the list restricted to single character. Of course, I found other issues that I have to address first, but the goal is to have something like that.

    What is the preferred approach here?
    The past is a rudder to guide us, not an anchor to hold us back.

  5. #5
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Newcastle, UK (for a bit)
    Posts
    29,401
    As Moon Wizard mentions - if you're just displaying one set of data held in a <windowclass> specification, then use subwindow. You can change the database source of the subwindow using setValue: https://fantasygroundsunity.atlassia...indow#setValue

    Use the subwindow onDrop function code to change the database source to the new PC charsheet node when a PC is dropped on the subwindow.

    However, the Party Sheet order tab - watch order section is a windowlist that contains more than one entry. So I'm confused as to what you're trying to do.
    Last edited by Trenloe; May 3rd, 2021 at 13:12.
    Private Messages: My inbox is forever filling up with PMs. Please don't send me PMs unless they are actually private/personal messages. General FG questions should be asked in the forums - don't be afraid, the FG community don't bite and you're giving everyone the chance to respond and learn!

  6. #6
    I think I posted here prematurely, I have to think through the end-goal, there might be indeed better option than list with single item.
    The past is a rudder to guide us, not an anchor to hold us back.

  7. #7
    Quote Originally Posted by Valyar View Post
    I think I posted here prematurely, I have to think through the end-goal, there might be indeed better option than list with single item.
    I wanted to mention I considered a similar approach when rebuilding the CT in the 2E ruleset. I wanted it to use the windowlist for the selected entry from the CT as a single windowlist because I thought it was much easier to hand off data to a windowlist.

    In the end, I went with a windowclass and used the API calls to "set" a database for the window.

    I understand the thought process but there is probably a better way to go about it using a non-windowlist.
    ---
    Fantasy Grounds AD&D Content Bundle (All The AD&D Content)
    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)
    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)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Starfinder Playlist

Log in

Log in