ShowIf Parameter Naming

Forums 💬 NodeCanvas 🗨️ General Discussion ShowIf Parameter Naming

  • This topic has 0 replies, 2 voices, and was last updated 10 years ago by Gavalakis.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #14445
    async0x42
    Participant

      Hey, I was trying out the new ShowIf attribute, and I was thinking that “fieldValue” would be a more intuitive parameter name instead of “view”.

      It’s a totally minor qualm, but I think it makes more sense in the context of “ShowIf ‘boolean value’ is equal to (field value) true/false”, instead of “ShowIf ‘boolean value’ is true -> set view to true/false

      The end result is the exact same for either way, so it really doesn’t matter, but for me personally, ‘view’ threw me off for a couple seconds on first glance of the tooltip, and I was thinking fieldValue might work better.

      Thanks for adding this in the last update though, works great!

      Edit: Expanded explanation below:

      [ShowIf("autoPhase", false)] -> Makes me think Show <whatever option> if autoPhase is false,
      In the tooltip -> The parameter name ‘view’ makes me think, Set the view of this option to false, if autoPhase is true.

      If the parameter was named fieldValue, then my thinking would match what I’m reading in the code. If that explains it any better… It’s only one word change in the source for me, but I figured I’d voice my first impression anyways haha

      #14447
      Gavalakis
      Keymaster

        Hey,

        Hah. That was a long post on that 🙂
        I will see to a better name.

        #14446
        async0x42
        Participant

          Ah, I didn’t want to be stepping on your toes for naming conventions and things like that, so thought I’d better explain my reasoning… it was a bit long though haha!

        Viewing 3 posts - 1 through 3 (of 3 total)
        • You must be logged in to reply to this topic.