Possible problem in Dictionary obj event text?

0 favourites
  • 4 posts
From the Asset Store
Change delay, create new lines, "backspace" the text
  • I just noticed a possible problem with the Dictionary object's block text.

    When I add the condition "Compare current value", the resulting condition in the event block reads "Current key = ..." instead of "Current value = ..."

    That is, it says it's comparing a key, when it's really comparing a value.

    Does this happen for anyone else?

  • Never had a problem with Dictionary. Can you post an image snippet of what your doing.

    Also just to let you know. Current Key and Current Value only work right when your doing a specific Dictionary ForEach loop. There is a System ForEach, but Dictionary and Array both have custom loops. These loops use the refernece for Current XY stuff.

    So if your doing CompareCurrent value with a CurrentKey and not in a foreach loop from Dictionary. It's going to fail.

    "CurrentKey

    CurrentValue

    In a For each key event, these return the key and its value (respectively) for the current key being iterated."

    https://www.scirra.com/manual/140/dictionary

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thanks jayderyu,

    I'm actually familiar with the built-in iterator for the Dictionary. I'm not having a problem with the functionality. I just think I might have spotted a typo in the text describing the functionality.

    I've included some images below.

    You can also check for yourself by opening a new project, adding a Dictionary, and then adding the Dictionary's "Compare current value" condition to any event. The typo seems to be in the event block text for that condition.

    Walk-through:

    Another example where the confusing nature of the typo might be a little clearer.

  • This is probably a typo, you qhould report it to the bug reports forum in that case

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