Array behaviour doesn't work properly in spawned objects



  • 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:

    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"].


  • Admin

    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.



  • @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.


Log in to reply