Acknowledged

Visual Studio Code and makeWebRequest and SDK 4.1.6+

Hi,
this does not work with SDK 4.1.6 and later in Visual Studio Code:
Communications.makeWebRequest("https://api.openweathermap.org/data/2.5/weather", params, options, method(:onReceiveWeather));
Error:
Invalid '$.Toybox.Lang.Method(responseCode as Any, data as Any) as Any'
passed as parameter 4 of type
'PolyType<(callback(responseCode as $.Toybox.Lang.Number, data as Null or $.Toybox.Lang.Dictionary or $.Toybox.Lang.String) as Void)
or
(callback(responseCode as $.Toybox.Lang.Number, data as Null or $.Toybox.Lang.Dictionary or $.Toybox.Lang.String, context as $.Toybox.Lang.Object) as Void)>'.
Unfortunately I have no idea what could be causing this.
Has the function been removed or changed?
Regards
Joerg
Parents Comment Children
  • By turning off type checking for now, you can see if any differences occur for your app starting with 4.1.6.  Then try the lowest level of type checking and see what you see.  Once that's ok, try the middle level of type checking, then the strict level

    if you add

    project.typecheck=0

    to your monkey.jungle file, you change 0 to 1, 1 to 2. and 2 to 3 to go through the levels and only for that specific project.  You want the setting for type checking to be "default" in the VS Code extension settings.