Jungle Files driving me nuts

Sorry to say, but this is an unacceptable compatibility issue. I have used resource overriding a lot and now I realized that with CIQ2.4.1 the string overriding doesn't work at all any more. All the resources-language directories are there. And to be honest, I don't understand the programmer's guide what to do to migrate. It's a mess. As soon as I want to revert back to CIQ2.3.x I get a failure that the iq:barrels tag in the manifest file is wrong. Another unacceptable compatibility issue. To be honest, I can't see any advantage of the jungle as well as the barrel thing.

To get my string overriding running again: is someone out there, who knows what to do to migrate? Thanks for supporting.
  • Former Member
    Former Member
    Im confused and annoyed by the same thing,...please help!!
  • Former Member
    Former Member
    topcaser

    Let's walk through what you are trying to do. How Jungles affect you is going to depend on what type of elements your project uses, if you're using Eclipse or not command line, etc. We've got a tool to help migrate from 2.3 to 2.4 if you are using a Connect IQ perspective and Eclipse. In that, you can migrate your project if you are not using Eclipse, but knowing these elements in more detail would be helpful. We can try and help you work through this here or through email if you prefer.

    Thanks,
    -Coleman
  • I think this might be the same (or a related) issue that I ran into (and haven't found a resource-based solution for). I think that SDK 2.4.x gives a higher precedence to language-based resource files than the device specific files whereas it was opposite with SDK 2.3.x. I am unsure if this is the case on the actual device but it is certainly the case with the simulator.

    The example I ran into was that in the device specific resource folders I override a string with the device name. I implement this by have a string, named DeviceName, defined in the generic resources folder as well as a matching resource (since the compiler complains otherwise) in each of the language folders (eg. resources-fre) as "unknown". Then in device specific folder (eg. resources-d2bravo) that same string is defined as "D2Bravo". In SDK 2.3, when I retrieved the resource the "D2Bravo" string took precedence but now with SDK 2.4.1 the resource returns "unknown" for all devices when the language configured matches one of the resource folders (ie. simulator configured for French and there is a matching resources-fre folder).

    The solution I can think of here is to switch the device name to an attribute within the code but then I require a specific class for each device, which is considerably more overhead than overriding a single string.

    To make matters worse, this solution of identifying the device using a string has been the go-to, suggested method of doing this in the forums for several years now.

    Cheers,
    Douglas
  • Former Member
    Former Member
    topcaser,

    Based on the response from dbrobert, we want to take a further look at this. I don't think this is what we intended to happen when using resources this way. We created ticket to try and get things in line in this specific case. For now, you can utilize the workaround described by dbrobert in the post above, or move back to 2.3.5. You should be able to delete the barrels iq:barrels tag from the project manifest to get past the error you are seeing when trying to revert back.

    Thanks,
    - Coleman
  • Hi Coleman, I managed to get that beast working with my own workaround: I opened up the manifest file editor and changed to Languages tab and ticked those languages I have a resource file resulting in a list of languages in the language tag of the manifest file. By doing this all my languages are there again. This step wasn't necessary with old versions.
  • Coleman.ConnectIQ,

    Do you already have a test case for the issue I identified (resource folder precedence) or did you want me to put one together?

    Cheers,
    Douglas
  • Coleman.ConnectIQ Is there any update on this? It's still an issue in CIQ 2.4.2 and it's preventing me from deploying a couple apps since I'm not sure if this is a simulator, a compiler or a VM issue (or all of the above). If it's a VM only issue then I could probably still deploy since only the newer devices running 2.4.x would be affected and that is a small enough group with an easy enough fix to work around.

    Cheers,
    Douglas
  • Former Member
    Former Member
    Hey dbrobert,

    I don't have a timeline on this yet, but I can tell you that we have it priorities. My hope is always for a quick fix, but I don't get to make those decisions. :( It sounds like this is compiler level issue.

    Thanks,
    - Coleman
  • The example I ran into was that in the device specific resource folders I override a string with the device name. I implement this by have a string, named DeviceName, defined in the generic resources folder as well as a matching resource (since the compiler complains otherwise) in each of the language folders (eg. resources-fre) as "unknown". Then in device specific folder (eg. resources-d2bravo) that same string is defined as "D2Bravo". In SDK 2.3, when I retrieved the resource the "D2Bravo" string took precedence but now with SDK 2.4.1 the resource returns "unknown" for all devices when the language configured matches one of the resource folders (ie. simulator configured for French and there is a matching resources-fre folder).


    What happens when you do not put a matching resource for DeviceName in the language folders?
    I get warnings, but the code still compiles and executes fine. The only string resource I put in language folders is "Language". In the default resource "Language" is set to "unknown", and this works well for me.
    But the warnings are annoying and the behaviour is definitely not as optimal as it was in 2.3

    These are the warnings I get:

    BUILD: WARNING: String ID 'Device' undefined for language deu'.
    BUILD: WARNING: String ID 'AppName' undefined for language deu'.
    BUILD: WARNING: String ID 'Device' undefined for language ita'.
    BUILD: WARNING: String ID 'AppName' undefined for language ita'.
    BUILD: WARNING: String ID 'Device' undefined for language fre'.
    BUILD: WARNING: String ID 'AppName' undefined for language fre'.
    BUILD: WARNING: String ID 'Device' undefined for language eng'.
    BUILD: WARNING: String ID 'AppName' undefined for language eng'.
  • What happens when you do not put a matching resource for DeviceName in the language folders?


    I'm afraid I don't know and can no-longer find out (without rolling back to a previous Git version). I modified my code to rely on device families (Fenix 3 for F3, D2D, Q3, etc) and then made use of the jungle build system.

    Cheers,
    Douglas