Skip to content

Allow all objects to have instance variables including Touch and Keyboard #374

Open
@whscienceteacher

Description

@whscienceteacher

Reviewed guidelines

  • I have read and understand the suggestion guidelines

Checked for duplicate suggestions

  • I checked for existing similar suggestions

Summary

A few objects don't have instance variables, probably because they are objects that don't allow multiple instances.

For code organization purposes, it would still be helpful for objects like touch, keyboard, and PlatformInfo to have instance variables, (or if you want name, it something different because they don't have instances that would be fine too.)

Possible workarounds or alternatives

You can use global variables now, but it gets messy. Large projects can end up having huge numbers of global variables and splitting off TouchLastX, TouchLastY, etc. into the relevant object would be very helpful.

Proposed solution

Give all objects instance variables, even if there can only ever by one instance of the object.

Why is this idea important?

Large projects would benefit.

Additional remarks

I recognize this isn't the most important feature request and I know that you caution against saying that any request is easy. If this is difficult, please close it, but if it really is easy, it would be nice to have.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions