Annotation Exclusions for On-Device Settings

I am having problems trying to define annotation exclusions for on-device settings. I want to create two different sets of settings: one for devices that have an internal sensor and one for those that do not. But when I do this, I get an error, "Attempting to redefine object", even though I tried to account for every device in the jungle file.

(:api_3_2_up, :hasSensor)
class AppSettingsMenu extends WatchUi.Menu2 {
// code
}

(:api_3_2_up, :noSensor)
class AppSettingsMenu extends WatchUi.Menu2 {
// code
}

(:api_3_2_up, :hasSensor)
class Merlin24SettingsMenuDelegate extends WatchUi.Menu2InputDelegate {
// code
}

(:api_3_2_up, :noSensor)
class Merlin24SettingsMenuDelegate extends WatchUi.Menu2InputDelegate {
// code
}

Is it possible to use annotation exclusions for classes that are extended from the WatchUi menu? Or do I just need to double check my long list of exclusions to make sure everything is accounted for?

Thanks

  • I just realized the code I pasted above was not quite correct, and I can't seem to edit the original post. I tried to delete it and repost, but for some reason the repost didn't look right. So assuming this post still exists, here's what I meant to put in the code block:

    (:api_3_2_up, :hasSensor)
    class AppSettingsMenu extends WatchUi.Menu2 {
    // code
    }
    
    (:api_3_2_up, :noSensor)
    class AppSettingsMenu extends WatchUi.Menu2 {
    // code
    }
    
    (:api_3_2_up, :hasSensor)
    class AppSettingsMenuDelegate extends WatchUi.Menu2InputDelegate {
    // code
    }
    
    (:api_3_2_up, :noSensor)
    class AppSettingsMenuDelegate extends WatchUi.Menu2InputDelegate {
    // code
    }

  • On another note, it would be nice if there could be a way to specify resources and exclusions based on the API compatibility, so I don't have to a bunch of device-specific resource and exclusion statements.