-
-
halloleooo
I have a image in the pillow format PIL.Image (generate via
Image.new()
) and I want to display it in aui.ImageView
component.ImageView
has animage
property, but it is of typeui.Image
, not of typePIL.Image
.What can I do? How do I convert
PIL.Image
toui.Image
?Thanks heaps for any pointers!
-
halloleooo
I am building a little share extension with a
view
UI. For this UI I need a few extra variables along side the view of the extension.What's the best place to store these variables?
- Global variables (either individually or as a class object with attributes)?
or
- Using a sub-classed
View
just to hold these variables in the UI?
-
-
halloleooo
I'm back on Pythonista! Used it quite a bit a few years ago for some automation and it's cool that it is still going strong! :-)
But now I'm playing with UIs: Is it possible to develop and run scripts using the
ui
module and*/pyui
files on a (non-M1) Mac? Is there a version of theui
module available which runs with normal Mac/Linux versions of Python?I saw in this forum that Pythonista itself seems to run on M1 Macs, but unfortunately I am way off getting a new Mac...
Thanks for any pointers!
-
-
halloleooo
Thanks @mikael
Much appreciated your tip. I will try this. :-)
(Very strange though that I didn't not get any email notification about your reply... Does this forum not send emails out???)
-
halloleooo
When I put a UI element via
@ui.in_background
in the background, how can I react to the result in my normal (foreground) flow?Say I have
dialogs.list_dialog
and I want to do something with the result of the list in mymain
function. Can I somehow wait for the result ? -
halloleooo
Thanks @cvp!
So can I decorate my whole
main()
of the share extension (which includes theans = dialogs.list_dialog
call) with@ui.in_background
?