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

Global Variable in Display Dialogue Event doesn't show in Variable Uses #1628

Open
lkcampbell opened this issue Nov 4, 2024 · 2 comments
Open
Labels
bug Something isn't working

Comments

@lkcampbell
Copy link

lkcampbell commented Nov 4, 2024

Describe the bug:
When you check where a global variable is used in your project, by clicking on the variable and looking at the Variable Uses list, you won't see any variable use from the free text area part of the Display Dialogue Event.

To Reproduce:

  1. Create a global variable foo.
  2. Add a Display Dialogue Event to an On Init part of the Scene 1 scene.
  3. Put this text in the Display Dialog Event: foo = $foo.
  4. Click on global variable foo in the VARIABLES section of Navigator.
  5. Observe the Editor Sidebar.

Observed behavior:
observed-behavior

Expected behavior:
expected-behavior

Platform (please complete the following information):

  • OS: macOS 14.6.1 (23G93)
  • App version 4.1.3
@chrismaltby
Copy link
Owner

chrismaltby commented Nov 7, 2024

At first I wasn't able to reproduce this issue but it turns out this happens for "Variable 0" only, renaming any other variable to Foo and using it in dialogue worked as expected with uses being shown.

It ended up being a single character code change to fix but rather than just doing that I've extracted the code that was determining if variables were used in text/expressions into something more testable and have written a number of test cases to make it easier to spot if this issue ever comes back. 2386497

This will be included in the next release :-)

@lkcampbell
Copy link
Author

Ah, good catch! I didn't even think to try other variables. I will remember to do that in my future testing. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants