Connect IQ > 4.1.6 - problem with overriding functions

I've following hierarchy:

    Setup extends BaseSetup
    BaseSetup extends CoreSetup
    CoreSetup
    
    My setup class implements following:
    
        function load()
    
    My BaseSetup implements following:
    
        protected function load(key, numberOfDataFields)
    
    My CoreSetup following:
    
        protected function load(key, numberOfDataFields)

As you can see the BaseSetup overrides the function of the CoreSetup.

As you can see as well, the final Setup class wants to define a load function that does NOT override any base functions but this does not work anymore in CIQ 4.1.6 and CIQ 4.1.7
    
I get following error: Cannot override '$.BaseSetup.load' with a different number of parameters.

Question

In the past the compiler was smart enough to detect that functions with different parameters do NOT override the function in the parent class. Is this a new "rule" that functions with same names are not allowed anymore? Do I really need to use different names now for all functions even if I use different parameters?

  • try "$(srcBase)" instead of "$source(srcBase)", same for $resource

  • what a nightmare now it gives me error on this string 

    BUILD: ERROR: vivoactive_hr: /Users/lcda/eclipse-workspace/PowerBikeField/PowerBikeField-master/PowerBikeField/source-vivoactive_hr/PowerBikeFieldApp.mc:11: Redefinition of '$.PowerBikeFieldApp'. Previous definition at /Users/lcda/eclipse-workspace/PowerBikeField/PowerBikeField-master/PowerBikeField/source/PowerBikeFieldApp.mc:11.



    11 class PowerBikeFieldApp extends App.AppBase {

  • ok but the good news is that the main destination source works the fr920xt it has to be the jungle strings

  • ok now I think it works this way but I think something it's wrong the $ is missing but it works

    project.manifest = manifest.xml
    srcBase=source
    resBase=resources
    
    base.sourcePath = $(srcBase)
    base.resourcePath = $(resBase)
    
    base.excludeAnnotations = source-fenix3
    base.excludeAnnotations = source-fr230
    base.excludeAnnotations = source-vivoactive_hr
    
    vivoactive_hr.sourcePath = source-vivoactive_hr
    vivoactive_hr.resourcePath = $(resBase)
    vivoactive_hr.excludeAnnotations = source




  • ok my specific problem with 4.1.7 is this.

    I build the exclsions in the xml file this way

    <build>
    <exclude file="../source/PowerBikeWindView.mc" />
    </build>

    but now it does not work


    so my question is how can I use the main source and resources folder for an app only excluding the PowerBikeWindView.mc

    I´m using this but it ask me for icon and string files, so I do not want to make copies of strings and icons for each device

    fr920xt.sourcePath = $(fr920xt.resourcePath);source-fr920xt

    fr920xt.excludeAnnotations=source

    fr920xt.resourcePath = $(fr920xt.sourcePath);resources-fr920xt

  • If there's only the class in that file then you can use excludeAnnotation on the class. Something like:

    (:memory16K)
    class MyClass extends WatchUi.SimpleDataField {
  • no, it does not work it still ask me for all icon and string files, I think I´doing something wrong with exclusions

  • ok now it's fixed I did not know you have to exclude also main source this way

    forums.garmin.com/.../jungles-do-not-work-as-expected-on-real-devices


  • no it does not work, it's a nightmare these are the errors I ´ll Stay on 4.15

    BUILD: ERROR: Failed to compile application for device id 'marqcommander'.

    BUILD: usage: monkeyc [-a <arg>] [-b <arg>] [-c <arg>] [-d <arg>] [--debug-log-level

    BUILD: <arg>] [--debug-log-output <arg>] [-e] [--Eno-invalid-symbol] [-f <arg>]

    BUILD: [-g] [-h] [-i <arg>] [-k] [-l <arg>] [-m <arg>] [-o <arg>] [-O <arg>] [-p

    BUILD: <arg>] [-r] [-s <arg>] [-t] [-u <arg>] [-v] [-w] [-x <arg>] [-y <arg>]

    BUILD: [-z <arg>]

    BUILD: -a,--apidb <arg> API import file

    BUILD: -b,--apimir <arg> API MIR file

    BUILD: -c,--api-level <arg> API Level to target

    BUILD: -d,--device <arg> Target device

    BUILD: --debug-log-level <arg> Debug logging verbosity [0=errors, 1=basic,

    BUILD: 2=intermediate, 3=verbose]

    BUILD: --debug-log-output <arg>Output log zip file

    BUILD: -e,--package-app Create an application package.

    BUILD: --Eno-invalid-symbol Do not error when a symbol is found to be invalid

    BUILD: -f,--jungles <arg> Jungle files

    BUILD: -g,--debug Print debug output

    BUILD: -h,--help Prints help information

    BUILD: -i,--import-dbg <arg> Import api.debug.xml

    BUILD: -k,--profile Enable profiling support

    BUILD: -l,--typecheck <arg> Type check [0=off, 1=gradual, 2=informative,

    BUILD: 3=strict]

    BUILD: -m,--manifest <arg> Manifest file (deprecated)

    BUILD: -o,--output <arg> Output file to create

    BUILD: -O,--optimization <arg> Optimization level [0=none, 1=basic, 2=fast

    BUILD: optimizations, 3=slow optimizations] [p=optimize

    BUILD: performance, z=optimize code space]

    BUILD: -p,--project-info <arg> projectInfo.xml file to use when compiling

    BUILD: -r,--release Strip debug information

    BUILD: -s,--sdk-version <arg> SDK version to target (deprecated, use -c

    BUILD: -t,--unit-test Enables compilation of unit tests

    BUILD: -u,--devices <arg> devices.xml file to use when compiling (deprecated)

    BUILD: -v,--version Prints the compiler version

    BUILD: -w,--warn Show compiler warnings

    BUILD: -x,--excludes <arg> Add annotations to the exclude list (deprecated)

    BUILD: -y,--private-key <arg> Private key to sign builds with

    BUILD: -z,--rez <arg> Resource files (deprecated)

    BUILD: Complete

    Package Manager: Problem building package. See console for details. (200)