View Single Post
Markkyboy's Avatar
Posts: 433 | Thanked: 727 times | Joined on Oct 2012 @ Costa Blanca, Espaņa
#7
Originally Posted by pichlo View Post
Really? I stand corrected. But it means I dislike QML even more than before.

Being Old Skool, I would convert temperatureHighLabel.text to a number and work with that. It would be faster anyway if you do the conversion only once and not at the background for each comparison.

It would also give you a lovely opportunity to change the colour continuously rather than in discreet steps like in your example
temperatureHighLabel.text is converted to a number, that being the same number you see in the app but as temperature. I wholly agree about the way I'm using the code, I know its ugly, but for now, it's worked in previous applications/patches.
I don't yet know how else to actually tackle it. My WindDirection patch uses the same method, it gets windDirection as a number and converts to a given heading as text, so I know it works.....at least in that instance.

thanks,
__________________
..oO(Don't just sit there standing around, pick up a shovel and sweep up!)Oo..