PDA

View Full Version : Double Buttons bug



Velocinox
June 7th, 2013, 01:18
Anyone seen this before or more importantly know how to fix it.

This is connecting to a server, no other clients saw this issue. Server was running 3.5 ruleset with pathfinder option. I don't get this on any other server, or when I host.

TIA

https://i64.photobucket.com/albums/h179/Velocinox/DoubleButtonsFG2a.jpg

Moon Wizard
June 7th, 2013, 02:50
I've seen it occasionally when I have used the /reload command while building rulesets, but never tracked it down. Did you use the /reload command? Are you running any extensions?

Regards,
JPG

Dakadin
June 7th, 2013, 03:05
I believe that issue is caused when an extension overwrites the desktop.lua file that registers the buttons so they can add additional buttons. This can cause multiple calls to register the buttons. Most of the time FG handles the additional requests by letting the system know that it has already been created. I think systems that are slower to load can do the check before the button has completed the registration so FG thinks it needs to add it. Check if the GM is using an extension that has calls to DesktopManager.registerStackShortcut and DesktopManager.registerStackShortcut.

Velocinox
June 7th, 2013, 06:24
Check if the GM is using an extension that has calls to DesktopManager.registerStackShortcut and DesktopManager.registerStackShortcut.

He was running Blackfoot's PC controlling NPC (https://www.fantasygrounds.com/forums/showthread.php?t=17846) extension.

This is the code:



--
-- Please see the license.html file included with this distribution for
-- attribution and copyright information.
--

function onInit()
if not User.isLocal() then
if User.isHost() then
DesktopManager.registerStackShortcut("button_characters", "button_characters_down", "Characters", "charlist_host", "charsheet");
DesktopManager.registerStackShortcut("button_partysheet", "button_partysheet_down", "Party Sheet", "partysheet", "partysheet");

DesktopManager.registerStackShortcut("button_ct", "button_ct_down", "Combat Tracker", "combattracker_window", "combattracker");
DesktopManager.registerStackShortcut("button_options", "button_options_down", "Options", "options");

DesktopManager.registerStackShortcut("button_tables", "button_tables_down", "Tables", "tablelist", "tables");
DesktopManager.registerStackShortcut("button_calendar", "button_calendar_down", "Calendar", "calendar", "calendar");

DesktopManager.registerStackShortcut("button_light", "button_light_down", "Lighting", "lightingselection");
DesktopManager.registerStackShortcut("button_color", "button_color_down", "Colors", "pointerselection");

DesktopManager.registerStackShortcut("button_modifiers", "button_modifiers_down", "Modifiers", "modifiers", "modifiers");
DesktopManager.registerStackShortcut("button_effects", "button_effects_down", "Effects", "effectlist", "effects");

DesktopManager.registerDockShortcut("button_book", "button_book_down", "Story", "encounterlist", "encounter");
DesktopManager.registerDockShortcut("button_maps", "button_maps_down", "Maps &\rImages", "imagelist", "image");
DesktopManager.registerDockShortcut("button_people", "button_people_down", "Personalities", "npclist", "npc");
DesktopManager.registerDockShortcut("button_itemchest", "button_itemchest_down", "Items", "itemlist", "item");
DesktopManager.registerDockShortcut("button_notes", "button_notes_down", "Notes", "notelist", "notes");
DesktopManager.registerDockShortcut("button_library", "button_library_down", "Library", "library");

DesktopManager.registerDockShortcut("button_tokencase", "button_tokencase_down", "Tokens", "tokenbag", nil, true);
else
DesktopManager.registerStackShortcut("button_characters", "button_characters_down", "Characters", "identityselection");
DesktopManager.registerStackShortcut("button_partysheet", "button_partysheet_down", "Party Sheet", "clientpartysheet", "partysheet");

DesktopManager.registerStackShortcut("button_ct", "button_ct_down", "Combat tracker", "clienttracker_window", "combattracker");
DesktopManager.registerStackShortcut("button_options", "button_options_down", "Options", "options");

DesktopManager.registerStackShortcut("button_tables", "button_tables_down", "Tables", "tablelist", "tables");
DesktopManager.registerStackShortcut("button_calendar", "button_calendar_down", "Calendar", "calendar", "calendar");

DesktopManager.registerStackShortcut("button_color", "button_color_down", "Colors", "pointerselection");

DesktopManager.registerStackShortcut("button_modifiers", "button_modifiers_down", "Modifiers", "modifiers", "modifiers");
DesktopManager.registerStackShortcut("button_effects", "button_effects_down", "Effects", "effectlist", "effects");

DesktopManager.registerDockShortcut("button_book", "button_book_down", "Story", "encounterlist", "encounter");
DesktopManager.registerDockShortcut("button_maps", "button_maps_down", "Maps &\rImages", "imagelist", "image");
DesktopManager.registerDockShortcut("button_people", "button_people_down", "Personalities", "npclist", "npc");
DesktopManager.registerDockShortcut("button_itemchest", "button_itemchest_down", "Items", "itemlist", "item");
DesktopManager.registerDockShortcut("button_notes", "button_notes_down", "Notes", "notelist", "notes");
DesktopManager.registerDockShortcut("button_library", "button_library_down", "Library", "library");

DesktopManager.registerDockShortcut("button_tokencase", "button_tokencase_down", "Tokens", "tokenbag", nil, true);
end
else
DesktopManager.registerStackShortcut("button_characters", "button_characters_down", "Characters", "identityselection");
DesktopManager.registerStackShortcut("button_color", "button_color_down", "Colors", "pointerselection");

DesktopManager.registerDockShortcut("button_library", "button_library_down", "Library", "library");
end

Interface.onDesktopInit = onDesktopInit;
end

function onDesktopInit()
if User.isLocal() then
Interface.openWindow("systemselection", "", true);
else
if User.isHost() then
if not CampaignRegistry.systemselection then
CampaignRegistry.systemselection = "true";
Interface.openWindow("systemselection", "", true);
end
else
Interface.openWindow("identityselection", "", true);
end
end
end

Dakadin
June 7th, 2013, 06:35
Try this version. I just changed it to only include the command to add the Personalities button to the PCs desktop. I think it will resolve the issue for you but let me know if it doesn't.

Velocinox
June 8th, 2013, 19:22
Thanks, Dak.

I can't replicate the error locally, but the session that gave me the error doesn't meet until Thursday. I'll let you know if it helped then.

EDIT: Worked great, Dak. Thanks again.