Struggling a bit with Views and how stuff gets on the screen

I'm trying to get a layer working and I'm hitting an error/warning that seems.. off.

WARNING: fenix6xpro: /home/ciq/src/source/views/OverlayView.mc:54: Unable to detect scope for the symbol reference 'width'.
WARNING: fenix6xpro: /home/ciq/src/source/views/OverlayView.mc:54: Unable to detect scope for the symbol reference 'height'.

I've assumed I'm doing something wrong but the example code in WatchfaceAnimation in the samples directory seems to do the same and runs without this error. 


// lines 106-110 in source/AnimationWatchFaceView.mc

        _drawLayer = new WatchUi.Layer({
            :locX=>_drawLayerArea[0],
            :locY=>_drawLayerArea[1],
            :width=>_drawLayerArea[2],
            :height=>_drawLayerArea[3]});
            
// My code
    var layer = new Ui.Layer({
      :locX       => 140,
      :locY       => 140,
      :width      => 140,
      :height     => 140,
      :visibility => true,
    });

Now when I leave out the width/height it doesn't complain but I can't seem to get anything on the screen. I paint the whole screen blue and than I want the layer to be white and be painted.. yet my screen stays all blue.

Full code can be found here: gitlab.com/.../OverlayView.mc

  • Garmin doing its part to kill emoji culture No entry sign

    EDIT: gotta love the way "man saying no emoji" literally isn't supported on these forums. If you try to paste it in, you get the following individual emojis, which would be displayed as a single emoji literally everywhere else: No good♂️

    You'd think the forum would just support standard emojis as per the user's OS, as opposed to its own weird subset, but no, that would be too simple. (I'm sure this dates back to some legacy implementation where the forum implemented its own emojis as opposed to relying on support which was not yet standard across user's devices.)