CIQ 1.2 (ie Epix) - are data fields supposed to be fully recreated on page switches?

My data field for the Epix gets completely recreated each time you scroll to that page with the data field. Is this by design in CIQ 1.2? Is there any way around this?
  • I'm guessing this is a feature as I created the most basic Simple Data Field and Complex Data Field that just increment a counter in the compute function, initialized to zero. Each time I switch away from the page and back the counter resets to zero. So no saved state once the page with the data field is left.

    Just shows you how limited CIQ used to be and how far it has come.
  • No. As far as I can remember, this was never the expected behavior. The compute() method will be called every second whether a data field is visible or not. This implies that the data field will not be unloaded when it is not visible.

    This is documented the life-cycle documentation for the View class, and in the documentation from the DataField class, as well as personal experience (with non-epix devices).

    Travis
  • No. As far as I can remember, this was never the expected behavior. The compute() method will be called every second whether a data field is visible or not. This implies that the data field will not be unloaded when it is not visible.
    ...

    Thanks for the response. Well this is how I expected it to behave, and how it behaves on the 630 and VAHR. No way to really test it in the simulator as you can't switch pages while running a field.

    Anybody else out there have an Epix that has tried this? Hard to believe something so fundamental could be so broken.

    But seeing the exact same behavior in a Simple Data Field where I only changed the "compute" code as follows. Properly counts up every second until I leave the page. Upon returning, it restarts at zero. And if I put Sys.println messages in the app.initialize() function, it gets executed every time I return to the page.

    var c = 0;
    function compute(info) {
    c++;
    return c;
    }
  • More info. Once you actually start an activity (ie press the start button) it no longer delete/creates the field on page switches. So works as expected once you start. Not sure if this is technically then out of spec. Once I saw the problem, I was so focused on debugging that I never actually started the activity.

    This makes a bit more sense why it isn't more broadly seen. This is still different behavior, and unexpected, compared to my other devices.
  • I don't think I'd bee looking for a change on the Epix these days. I think the last FW update for it was around a year ago. (right about when app settings first came out in 1.2.1)
  • I don't think I'd bee looking for a change on the Epix these days. I think the last FW update for it was around a year ago. (right about when app settings first came out in 1.2.1)


    yea, not looking for a change. Just to understand it and decide if its worth any dev effort. minimal at best!
  • More info. Once you actually start an activity (ie press the start button) it no longer delete/creates the field on page switches. So works as expected once you start. Not sure if this is technically then out of spec. Once I saw the problem, I was so focused on debugging that I never actually started the activity.

    This makes a bit more sense why it isn't more broadly seen. This is still different behavior, and unexpected, compared to my other devices.


    I have seen this issue or something very similar on the Fenix 3. Before the activity is started, if I scroll through the pages, the Moxy data field will show that it's trying to find a sensor when it comes back up on the screen even though it had already connected to the sensor. However, after the activity is started, it shows the SmO2 and THb data right away when the Moxy data field is scrolled back into view.

    On the 735, once it connects with the sensor, it keep showing connected even when scrolling though views before starting the activity.
  • I verified that the Fenix3 has the same problem by putting a counter that counts up on every onUpdate call. Before the activity is started, the counter resets when scrolling between views. After the activity is started, the counter keeps counting up like expected.

    Two other things I didn't expect
    1) The counter appeared to reset to about 5 or 6 instead of 0. There must be about 5 real quick onUpdate calls when the data field screen is scrolled into view.
    2) When the counter data field was shown on the same screen as a timer, the counter counted really fast when the timer's hundredths of seconds were being updated. It slowed back down to once per second when the timer got high enough that hundredths didn't need to be shown.
  • Thanks for following up on this MoxyRoger. Your initial scenario is the exact one where I was originally noticing it, the repeated "update" message as it created the Sensor class. Makes sense as my Tracker Sensor is based on your sample field in the SDK (thanks). Also not too surprising that you are seeing it on the Fenix as well since (from my understanding) the Epix and Fenix are/were the same base code base.

    Question is is this outside the scope of the specification or is this technically a bug. I can definitely see where this could cause problems.