SDK 2.1.2 and 2.1.1 with vivoactive

Former Member
Former Member
Hello,

I have a watch face that support three devices (fenix3, 920xt and vivoactive), this app works fine with SDK 2.1.0, but with 2.1.1 and 2.1.2 I can't launch it in the sim for vivoactive model, is there any error with this model?

This is the error shown ...

Shell Version 0.1.0
Failed invoking <symbol>
Too Many Arguments Error
in onStart (C:\....\BSportyWFApp.mc:13)
Connection Finished
Closing shell and port

The function onStart is empty an line 13.

Thanks.
  • Former Member
    Former Member over 8 years ago
    The onStart function takes 1 argument. The old VMs did not enforce argument counts, but the new one is now validating them. You will need to add an argument to your definition of onStart. This argument is not currently used for anything, so just adding it to the function definition is all you will need.
  • Are the developer documentations / SDK doc updated to reflect this?
    I'm seeing this same error as well and adding a dummy argument still spits out other errors at other locations.

    function onStart(dummy) {

    }


    Failed invoking <symbol>
    Not Enough Arguments Error
    in onLayout (D:\dev\monkeybrains\toolchain.........
    in onUpdate (source/MyGymView.mc:624)
    Connection Finished
    Closing shell and port


    I am calling
    function onlayout(dc) {
    ..
    .
    }

    using View.onLayout();

    when changed to View.onLayout(dc); it seems to work but only when this function is called from within onUpdate(), if elsewhere then i get an error again. (eg: in MenuInputDelegate)

    Another quirk or just my interpretation?
  • Former Member
    Former Member over 8 years ago
    Argument counts are enforced in all locations now, so you will need to pass the correct number of arguments to functions.

    It probably isn't a good practice to call onLayout(dc) from somewhere other than onUpdate where you actually have the dc to pass to it. You may be fine if you aren't using it, but if you pass a dummy, and forget that you can't use the dc, or call the parent method, you could get in trouble.
  • Former Member
    Former Member over 8 years ago
    Hello Brian,

    Sorry for my late answer and thank you very much.

    Best regards.