How to Limit Instances of Datafield on a Layout?

Hi,

when I have two displays of a datafield in a complex layout layout, I get one call to onCompute per second and one to each onUpdate - all as expected

but I want to limit the user to one! … for a small datafield I can say “too small” but my problem use case is the split screen on watch or Edge with 2 valid sized fields

because I do a web request based on the dc size and obscurity in onCompute every X minutes

i could initialise the web request in onUpdate and not onCompute but I’d not know which request of multiple came back for which dc layout

so overall I was hoping there was some setting I had missed to limit the datafield to one user layout

 - thanks for ideas - Crisp

  • ... all excellent points. I'll take most of them and tinker at the others until I give up!

    In answer to one question... I "need" to put the source metadata and time on the image server-side -- hence the obscurity flags helping to ensure that information is visible on different layouts by not just using top-left-corner.

    In response to the other point made "if your data field is added multiple times by a user, and it behaves in some way that the user doesn't expect, respectfully speaking, it's not their fault if the data field acts in some way that looks wrong to them" -- I need to put some thought into minimum sizes and expected outcomes... but to extrapolate, if a user is non-English speaking they would "expect" an app to be localised if their platform language was set to, say, Polish... but I expect not a lot of applications published do that either so users have to be somewhat forgiving.

    In other frustrations, I got a report of a user getting the IQ screen implying there was an app crash but there is nothing on the ERA Viewer.  More things to investigate

  • This unfortunately happens more and more. Even I was able to reproduce it a few weeks ago. Crashed many times, synced in Garmin Connect (tell the user to sync!), but still nothing. Later I checked and no wonder, 'cause there's also no crash report in the CIQ_LOG.* files.

  • I thought about another thing. It doesn't work in the simulator, but it might work on real devices: try to use dc.toString() (looks like: "Obj: 227") as a key. In the simulator it looks as it's recycling 3 DC objects somehow (the same 3 numbers are repeating) Though I would be very cautious using this. I'd say I'd only use this on devices I own, so i'm able to test.

    Also regarding the metadata position: On a round shape watch I can see how you'd change the position. but on a rectangular edge?

    Again: I'm not sure why would a user intentionally add your datafield more than one on the same screen (and whether you really want to support it). If yes, then maybe the only way to go is to release multiple clones, and let the user configure it a bit more from the settings (i.e give them the option to choose in which corner to display the metadata) Undoubtably this solution would suffer from the exact same problems, but at least if adding multiple instances is a legitimate user request, then you could provide them with 2 or even more clones.

  • If you ever update DF Detector again, adding that .toString() as a display value would be interesting. Thanks again