Thread: Grouped Lists
-
January 7th, 2022, 09:25 #1
Grouped Lists
I've been puttering with grouped lists in my sidebar windows and I did fine with tweaking existing ones but adding new ones seems to be eluding me a bit. I got the window to appear with the title and headers... but none of the data shows up even though the data shows in the sidebar window. Obviously there's a hook that I'm missing somewhere...
Code:["maneuver"] = { bExport = true, aDataMap = { "maneuvers", "reference.standardmaneuvers", "reference.martialmaneuvers", "reference.optionalmaneuvers", "reference.advancedmartialmaneuvers" }, sRecordDisplayClass = "referencemaneuver", aGMListButtons = { "button_maneuvers" }, sSidebarCategory = "library", aCustomFilters = { ["Type"] = { sField = "type" }, ["Action"] = { sField = "action" } }, },
Code:["maneuver"] = { ["bytype"] = { aColumns = { { sName = "name", sType = "string", sHeadingRes = "maneuver_grouped_label_name", nWidth=150 }, { sName = "action", sType = "string", sHeadingRes = "maneuver_grouped_label_action", bCentered=true }, { sName = "pointcost", sType = "string", sHeadingRes = "maneuver_grouped_label_cost", bCentered=true }, { sName = "ocv", sType = "string", sHeadingRes = "maneuver_grouped_label_ocvmod", bCentered=true }, { sName = "dcv", sType = "string", sHeadingRes = "maneuver_grouped_label_dcvmod", bCentered=true }, { sName = "short", sType = "string", sHeadingRes = "maneuver_grouped_label_short", bCentered=true }, }, aFilters = { { } }, aGroups = { { sDBField = "type" } }, aGroupValueOrder = { "Standard Maneuvers", "Optional Maneuvers", "Martial Maneuvers", "Advanced Martial Maneuvers", "Advanced Ranged Martial Maneuvers" }, }, },
Code:<template name="button_maneuvers"> <button_text_sm> <anchored to="buttonanchor" width="80"> <top /> <left anchor="right" relation="relative" offset="5" /> </anchored> <state textres="library_recordview_label_maneuver_bytype" /> <script> function onButtonPress() local w = Interface.findWindow("reference_groupedlist", "reference.maneuver_bytype"); if w then Interface.toggleWindow("reference_groupedlist", "reference.maneuver_bytype"); else w = Interface.openWindow("reference_groupedlist", "reference.maneuver_bytype"); w.init({ sRecordType = "maneuver", sListView = "bytype" }); end end </script> </button_text_sm> </template>
Full License Operator - You must have a 'Lite' License to play in my games.
Member and GM in the Fantasy Grounds Pathfinder Society Group.
PFS Fantasy Grounds Forum
FG Community Teamspeak Server: ts.fg-con.com
Interested in Custom Character Portraits and Tokens? Contact me.
-
January 7th, 2022, 16:02 #2
Try changing aFilters = { { } }, to aFilters = { },
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!
-
January 7th, 2022, 18:28 #3
The paths in the window script should be reference.maneuver not reference.maneuver_bytype
EDIT: nevermind, those data paths in the window script are irrelevant. Those nodes do get created, but it isn't pulling the data from there.Last edited by darrenan; January 7th, 2022 at 18:41.
-
January 7th, 2022, 18:47 #4
In this case the grouped list is using a temporary data source when the window is opened - the code behind the reference_groupedlist windowclass builds the data. You can see a lot of these in the PFRPG2 ruleset, which makes extensive use of grouped lists - see campaign\template_campaign.xml.
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!
-
January 7th, 2022, 18:58 #5
Following up on this - using aFilters = { { } } in a default 5E grouped list actually raises an error - and so the grouped list is shown empty as the error stops the code that populates the window from running.
@Blackfoot - were you receiving an error? Something like this:
Code:[ERROR] Script execution error: [string "ref/scripts/ref_groupedlist.lua"]:317: getValue: Invalid parameter 2
Last edited by Trenloe; January 7th, 2022 at 19:01.
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!
-
January 17th, 2022, 16:38 #6
Sorry for not circling back on this. That did resolve the issue.
The only issue I'm having at this point is one of my group sorts isn't applying to the list... I figure there is some other factor in there I'm missing as the code looks identical to another one I have that is working... not at my machine right now so I can't show this... but.. I'm sure I'm missing something.Full License Operator - You must have a 'Lite' License to play in my games.
Member and GM in the Fantasy Grounds Pathfinder Society Group.
PFS Fantasy Grounds Forum
FG Community Teamspeak Server: ts.fg-con.com
Interested in Custom Character Portraits and Tokens? Contact me.
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks