-
December 14th, 2020, 22:44 #1
windowinstance and self closing causing "crash"
I am experimenting with "hypertext" links. The idea is that you use a template that will display a list of text (names of records) and then highlight the ones you're moused over. If you click on said record it will open the window associated with it. This part works.
I've configured the window in my test to "close()" if the onHover(bControl) bControl = false. This works, twice... on the third time when moving the mouse off of the opened window FGC crashes. In FGU I get the following error on the first time I do move the mouse off the record window.
Code:[12/14/2020 4:42:34 PM] s'hyperlink_Text.lua' | s'onInit' [12/14/2020 4:42:34 PM] s'hyperlink_Text.lua' | s'onInit' | s'datasource' | { #1 = s'.abilitynoteslist' } [12/14/2020 4:42:34 PM] s'hyperlink_Text.lua' | s'onInit' | s'activatewindow' | { #1 = s'quicknote_hover' } [12/14/2020 4:42:34 PM] s'hyperlink_Text.lua' | s'onInit' | s'node' | databasenode = { combattracker.list.id-00004 } [12/14/2020 4:42:46 PM] [ERROR] MOUSE UPDATE: System.InvalidOperationException: Collection was modified; enumeration operation may not execute. at System.Collections.Generic.HashSet`1+Enumerator[T].MoveNext () [0x00013] in <351e49e2a5bf4fd6beabb458ce2255f3>:0 at LEECPKFJIAJ.LMMHCENIOJI () [0x000cb] in <47f8d6a0706643a08ed500e0bc60c519>:0 at LEECPKFJIAJ.CLGFEEHEDAB () [0x00046] in <47f8d6a0706643a08ed500e0bc60c519>:0 at FG.FGDesktop.OPILCLOHJGM () [0x0002f] in <47f8d6a0706643a08ed500e0bc60c519>:0 at FG.FGDesktop.Update () [0x0004e] in <47f8d6a0706643a08ed500e0bc60c519>:0
Code:function onHover(oncontrol) if not oncontrol then close(); end end
---
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.
-
December 15th, 2020, 05:58 #2
Supreme Deity
- Join Date
- Mar 2007
- Posts
- 20,561
Don't close in onHover events. I can look, but it depends on the chaining. Even in FGC, there were certain events that you couldn't close/destroy on.
Regards,
JPG
-
December 15th, 2020, 08:19 #3---
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.
-
December 15th, 2020, 22:38 #4
Supreme Deity
- Join Date
- Mar 2007
- Posts
- 20,561
That's not really something that's supported right now. The hover system would need to be rewritten completely to account for objects disappearing in the middle. One of the problems is that hovering is a "stack of objects", since hover events are applied to multiple objects at once.
Regards,
JPG
-
December 15th, 2020, 23:38 #5
Hum, shame. W/o some kludgy hackery I wouldn't be able to get around that. Would really be nice to have the ability to close a window when it's no longer needed by moving the mouse away from it. Very useful for quick popup windows.
---
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.
-
December 15th, 2020, 23:42 #6
Supreme Deity
- Join Date
- Mar 2007
- Posts
- 20,561
That's basically what a tooltip is; so you could possibly use that if it's just simple text to show.
JPG
-
December 15th, 2020, 23:58 #7---
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