JadedTuna
Sep 04, 2014 - 19:24
Any ideas why?
My code is:
import ui
print ui.measure_string("Doesn't work")
Any ideas why?
My code is:
import ui
print ui.measure_string("Doesn't work")
'Return the dimensions (width, height) of a string if it was drawn with draw_string().'
If you like take my example and put your line into the draw method. (73.70399475097656, 14.315999984741211)
Sorry, this is a bug, ui.measure_string currently only works when called on the main thread, in a drawing context (e.g. when overriding a View's draw method).
@omz, now I understand. Waiting for the new Pythonista with fixes :D
+1 for fixing this bug