Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix slot swapping from map preview #4550

Merged
merged 1 commit into from
Jan 4, 2023

Conversation

Hdt80bro
Copy link
Contributor

@Hdt80bro Hdt80bro commented Jan 3, 2023

The slight change to not upvalue self into Combo's methods by not closing each in the initializer (so that it could become part of the class) in this PR revealed a latent bug in how the map preview ACUButton is dealt with in the lobby. Namely, its roll over callback was passing itself as the instance in the slot name combo event handler, which it is not able to cope with before passing on the event to the slot's default event handler. This produces this pair of warnings, which prevents the rest of the event getting handled:

warning: Error running HandleEvent script in CScriptObject at 12a7cdc0: \lua\ui\controls\combo.lua(471): attempt to call method `IsHidden' (a nil value)
         stack traceback:
         	\lua\ui\controls\combo.lua(471): in function `HandleEvent'
         	\lua\ui\lobby\lobby.lua(4812): in function `OnRollover'
         	\lua\ui\controls\acubutton.lua(73): in function `OnRolloverEvent'
         	\lua\maui\button.lua(78): in function <\lua\maui\button.lua:66>
warning: Error running HandleEvent script in CScriptObject at 12a7cdc0: \lua\ui\controls\combo.lua(485): attempt to call method `IsHidden' (a nil value)
         stack traceback:
         	\lua\ui\controls\combo.lua(485): in function `HandleEvent'
         	\lua\ui\lobby\lobby.lua(4814): in function `OnRollover'
         	\lua\ui\controls\acubutton.lua(73): in function `OnRolloverEvent'
         	\lua\maui\button.lua(88): in function <\lua\maui\button.lua:66>

@Garanas Garanas merged commit bd6b241 into deploy/fafdevelop Jan 4, 2023
@Garanas Garanas deleted the fix-marker-event-handling branch January 4, 2023 16:23
@Garanas Garanas added this to the Development iteration I milestone Jan 4, 2023
@Garanas Garanas added area: ui Anything to do with the User Interface of the Game area: lobby related to lobby: options, chat, etc labels Feb 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: lobby related to lobby: options, chat, etc area: ui Anything to do with the User Interface of the Game
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants