Strongly typed instance variables?

0 favourites
From the Asset Store
Easily store, modify, read and manipulate colors with Color Variables!
  • Agree with lucid - pop up window with a choice.

  • An option would be nice, as I could see where someone would want to use get text for debugging.

  • Another question: should the 'set instance variable' action force the type? *SNIP*

    I'm of the opinion that it should fail if the type is incorrect, at run time.

    If you're talking about when it's entered into the editor, then I suppose a choice would be good. The options that make sense to me would be:

    1) Construct automatically coerces the value into the correct type by explicitly adding the correct typecasting function around the value in the editor, and points it out to the user, so that they know what they did wrong.

    2) Cancel. Perhaps the user meant to use a different value entirely.

    3) Always allow Construct to convert. Not sure I like that, but some may find it useful.

    Pretty much what lucid said, I think. However, I'd be fine with just making the user pay attention to what values they are working with, and letting it error in all cases. As long as there is a meaningful error message, it would seem much the same as the choice to me.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Make it an application setting.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)