logo hyperPad Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Login

    Bug: Arrays and dictionaries in set input fields

    Scheduled Pinned Locked Moved
    Bug Reports
    2
    3
    106
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Jack8680J
      Jack8680
      last edited by

      Using an array or dictionary in a set input field doesn't work properly. Here's an example:

      0_1512528942819_IMG_0615.PNG

      The array is:

      0: This is the value at index zero
      1: This is the value at index one

      The text input gives this:

      ( "<BehaviourInputField: 0x174a56c50> = { \n\tControlled By = self \n\tValue Key = (null) \n\tValue: This is the value at index zero \n}", "<BehaviourInputField: 0x17444add0> = { \n\tControlled By = self \n\tValue Key = (null) \n\tValue: This is the value at index one \n}" )

      Dictionaries do the same thing:

      { "my first key" = "<BehaviourInputField: 0x170e56410> = { \n\tControlled By = self \n\tValue Key = (null) \n\tValue: my first value \n}"; "my second key" = "<BehaviourInputField: 0x170c50440> = { \n\tControlled By = self \n\tValue Key = (null) \n\tValue: my second value \n}"; }

      Edit: moved to bug report section, originally posted to help and support.

      1 Reply Last reply Reply Quote 1
      • T
        Thecheater887
        last edited by Thecheater887

        This isn't a bug.

        If you print an array in, say, C#, this is what you will see; a summary of the printed object.

        Now, if you print Array[0] + Array[1], you will see This is the value at index 0.This is the value at index 1. This is because it now knows to pull and print the contained strings, rather than print the array itself.

        Dictionaries should work the same way.

        Jack8680J 1 Reply Last reply Reply Quote 0
        • Jack8680J
          Jack8680 @Thecheater887
          last edited by

          @Thecheater887 no, arrays and dictionaries are supposed to be returned in json, so it should return:
          ["This is the value at index zero","This is the value at index one"]

          It works fine if I put the array output directly in the text input.

          If this wasn't a bug it'd be a huge inconsistency since it returns in json format all other ways except in a set input field.

          1 Reply Last reply Reply Quote 1
          • First post
            Last post