Forum Archive

Custom View from pyui file

Katterfelto

I’ve just started to play with Pythonista. Is it possible to create a pyui file and the use it populate a custom view?

I can only find examples of custom views populated using classes defined in the same file. I assume I can import a class in a different file and import it into my main file and use that, but pyui files don’t seem to define a class some I’m not sure what to do.

JonB

See this thread, and the breadcrumbs therein:

https://forum.omz-software.com/topic/5129/custom-view-class-loading-a-pyui-into-itself-with-instance-method-actions

My memory on this is all a little fuzzy... See if it works, if not I can try to put together a more concrete examples.

Katterfelto

Thanks JonB I think that’s just what I needed.