Is the UI library used to create dialogs for tracing available to user
I got a nice surprise when I started using Pythonista 3. Especially the trace and variable dump/print to screen for a particular place the code hits. I guess my question might be for @omz and it is this: the dialog that came up for tracing is magnificent. It has dimming support and you can move the entire dialog around the screen to keep it but move it away. The UI for the dialog does not look like the dialog I can create with the Pythonista ui module. Can the user make use of the libraries and runtime that create, manage the lifetime for, and have a lot of useful features I have not seen in ios. Now I am at ios 10 on my iPad Pro 12in. Is that relevant or the dialog library is part of Pythonista?
If it is currently private code please think about opening it up to the user. My little utilities I run on my iPad would look and feel so much better if I had access to this dialog library.
See the overlay class here, for a similar idea that you can extend:
@JonB, thank you for a way to construct similar behaviour but I'm really only interested in what you get "for free" so to speak from Pythonista. I'm not interested in a new UI module, I specifically want THIS module lol.
@ltddev I believe that the classes for this are exposed through the
objc_utilextension that pythonista has but there is no pre-written library/module for accessing the
@omz, would you mind chiming in to give the definitive answer here?
The particular widget is an ObjC interface, (there is a python subclass of BDB, but it makes c calls to update the display.).
With the obj_util library, you now have almost complete and total access to any view in the pythonista heirarchy, so can add a subview of your choosing to the view of your choice. The example i linked to showed how this can be done, for the particular case of a floating window that is attached to either the editor window, the console window, or the root pythonista window. Other examples that have been shown on the forums include adding buttons to the editor toolbar, adding keyboard shortcuts, redefining what some spp buttons do, etc.
So, this capability is already there "for free" and you are welcome to study or use this example for your own purposes...
You ought to write an enhancement request over at https://github.com/omz/Pythonista-Issues/labels/enhancement. You can see there are over 100 at the moment, so I wouldn't necessarily wait around for the built in solution...
@JonB you mention that "Other examples that have been shown on the forums include adding buttons to the editor toolbar, adding keyboard shortcuts, redefining what some spp buttons do, etc."
I have been searching obviously by the wrong key because I am not able to find any such posts. Can you please maybe give me some links to these examples for adding buttons to toolbar and other such similar examples?
I know... search seems to fail horribly.
Keyboard: a few links in here
Many of my experiments are here:
the overlay i linked to before does show how you can hook into the app's views for your own purposes. the objc_util is a little tricky to understand at first... if there is some specific interface that you want to create, just ask, someone probably can help