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

Add inherited variables support for script debugger #18410

Merged
merged 1 commit into from
May 28, 2018
Merged

Add inherited variables support for script debugger #18410

merged 1 commit into from
May 28, 2018

Conversation

Geequlim
Copy link
Contributor

@Geequlim Geequlim commented Apr 25, 2018

20180425132023

Fix #18346

@volzhs volzhs added this to the 3.1 milestone Apr 25, 2018
@reduz
Copy link
Member

reduz commented May 27, 2018

Seems very nice, fine to merge by me

@akien-mga akien-mga merged commit bce002f into godotengine:master May 28, 2018
@neikeq
Copy link
Contributor

neikeq commented May 28, 2018

I don't get it. What is base.gd and script_base.gd? Which one is the base script?

@Zireael07
Copy link
Contributor

script_base looks to be the base (see BASE_CONST at the bottom)

@neikeq
Copy link
Contributor

neikeq commented May 28, 2018

And what is base.gd? 😄

@Zireael07
Copy link
Contributor

Example of really poor naming 😆

@Geequlim
Copy link
Contributor Author

@neikeq This class extends base.gd which extends script_base.gd :p

@neikeq
Copy link
Contributor

neikeq commented May 29, 2018

So if I understand correctly, in the image above we see A (script with the extend_var field) which inherits B (base.gd) which inherits C (script_base.gd). Am I right?

If that were the case, I think script_base.gd should be nested inside base.gd, not placed after it. e.g.:

extend_var
V base.gd
    base_var
    V script_base.gd
        a
        b

instead of

extend_var
V base.gd
    base_var
V script_base.gd
    a
    b

and maybe the base class should be placed before the other members:

V base.gd
    V script_base.gd
        a
        b
    base_var
extend_var

folded by default, of course.

@vnen
Copy link
Member

vnen commented May 29, 2018

I don't think it needs to be nested. It's like the regular Inspector: the derived class is shown first then it goes to each the parent classes. Godot doesn't have multiple inheritance, so if you nest them it'll just create a line of nested sections, reducing horizontal space as well.

@Geequlim
Copy link
Contributor Author

@neikeq Yes. Other debugger inspector like QtCreator use a nested tree instead of a list to show the base classes.

Why I didn't nested the base classes:

  • As mentioned by @vnen that will take more horizontal space.
  • We have to expand more sections to check the members of the top-level base class.

@neikeq
Copy link
Contributor

neikeq commented May 30, 2018

After thinking about the Inspector example, I think it's fine this way.

@akien-mga
Copy link
Member

Now that Godot 3.1 has been released, we don't plan to cherry-pick new features and enhancements to the 3.0 branch, unless there is very strong support in favor of it. Removing cherrypick label for 3.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Inherited variables not visible in debugger.
7 participants