Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
hyperPad

hyperPad Forum

  1. Home
  2. Bug Reports
  3. Fixed
  4. Array behaviour doesn't work properly in spawned objects

Array behaviour doesn't work properly in spawned objects

Scheduled Pinned Locked Moved Fixed
3 Posts 2 Posters 1.0k Views 1 Watching
  • 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.
  • Aidan_FireA Offline
    Aidan_FireA Offline
    Aidan_Fire
    wrote on last edited by
    #1

    iPad Air (1st)
    Latest version of iOS 12
    Latest released hyperPad as of now

    The Array behaviour, when one of its entries/values is referencing a behaviour's output from within the same object, and you spawn another object with this array setup, the spawned object's array will reference the behaviour from the original object rather than from the identical behaviour inside this spawned object.

    Here's an example project:
    https://go.aws/35htYa3
    If you look in the logic of the empty label object, you would expect that it and any spawned version of itself will display ["test","0"] to start with, and when you tap on any of them the one you tap on should switch to ["test","3"]. But instead, pressing on the spawned ones does nothing, and pressing on the original changes all of them to ["test","3"].

    1 Reply Last reply
    0
    • HamedH Offline
      HamedH Offline
      Hamed
      Admin
      wrote on last edited by Hamed
      #2

      I fixed this, but theres a side effect of when you spawn an object with arrays or dictionaries, its going to have to loop through each value and update it. So potentially slower spawning object that have an array or dictionary with a lot of keys / values.

      Aidan_FireA 1 Reply Last reply
      0
      • HamedH Hamed

        I fixed this, but theres a side effect of when you spawn an object with arrays or dictionaries, its going to have to loop through each value and update it. So potentially slower spawning object that have an array or dictionary with a lot of keys / values.

        Aidan_FireA Offline
        Aidan_FireA Offline
        Aidan_Fire
        wrote on last edited by Aidan_Fire
        #3

        @Hamed That makes sense anyway. Store a lot of information in an object (by default of course, probably don't want to duplicate the information if it's modified lol) and try to duplicate it, get lag. Same thing happens when you put lots of behaviours in.

        1 Reply Last reply
        0

        Hello! It looks like you're interested in this conversation, but you don't have an account yet.

        Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

        With your input, this post could be even better 💗

        Register Login
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Search