Wish list for next release
First of all, great job with 2.0, it's a great update, and everything I expected.
I don't know if you're planning to work on an editorial update next or pythonista, or maybe something else, but I thought I'd start a thread where people can post their thoughts about what should go into the next update.
I think for the next update, it would be helpful to just provide more modules for use. This would be a good contrast to 2.0, which updates the editor in a lot of ways. The top 5 modules I'd like to see the most are:
photosmodule but for videos
I think this alone would be a significant update to pythonista, adding a lot of functionality.
I'm curious to hear what other people want to see most from the next update.
@Olaf I don't have a keyboard to test with, but this should be possible in objc by setting the keyCommands on the SharedApplication, or perhaps the specific view controllers. Maybe someone with an ext kb and some objc knowledge can pipe in.
@JonB I have a bluetooth keyboard handy. This would, however be good for a built-in feature. I don't think saying "You can do it with
objc_util" should become a replacement for actually implementing it in the app.
Try running this, which adds a command-h shortcut, which simply prints hi to the console.
(if there is already a command-h shortcut, just change the 'h' on line 27 to some other unused character)
This is not very clean, and might not survive globals clears, and should not be run multiple times, but is more of a proof of concept. If it works, it would be easy to extend to something cleaner (ps this shows an example of swizzling, though in a not very safe manner)
Thanks, @JonB, but it doesn't work. I got an AttributeError on line 20:
No method found for selector "initWithInput:modifierFlags:action:"
UIKeyCommand.keyCommandWithInput_modifierFlags_action_and the script will run.
@JonB The script runs after above modification. But it seems to have no effect. Any ideas? It would be super awesome to get this script working.
Ok, I see the issue... we need to use class_addMethod to add a method to the UIApplication, then the action would be a selector. Apparantly I didn't actually read the docs! I think I can have a fix a little latrr tonight
sorry to hijack the wishlist thread... custom keyCommands discussion is now here
A unary minus for the Vector2 class would have been nice:
>>> import scene >>> v = scene.Vector2(1, 2) >>> v * -1 Vector2(-1.00, -2.00) >>> -v Traceback (most recent call last): File "<string>", line 1, in <module> TypeError: bad operand type for unary -
And the next beta build linked against the GameController network. We can test if it solves the problem by using the objc module.
TableView with more than a single column
PLEASE bring back the Export Canvas to Photos button (from the console); can't even find a function to copy canvas to clipboard so I can use a startup script with code like photos.save_image(clipboard.get_image()).
Argh. Now I regret updating.(Only me?)
Additional to @Oscar's unary minus, it would be nice if scene.Vector2 supported:
- unary plus
from __future__ import division(now breaks division by scalar)
- initiation from another vector (and more generally any sequence of length 2) for generic code
- polar coordinates (like
In 1.5 you could tweak this, but no longer in 2.0 as it's a built-in now
@ExParrot yes, only you. I find that most canvas stuff can be done with
ui.Pathand then exported as an image using the appropriate
Interactive notifications with the notifications module (for those that don't know what I'm talking about, swipe down on the notification next time you get a text from the Messages app.
Not a big issue. But would be nice have the console.set_color method updated or another method added to handle the console colors with more grace.
Maybe I missed something as usual, but after getting a json object from the web with css color names and hex values, I did this
conv = ui.parse_color(v) console.set_color(conv, conv, conv)
Maybe I missed something. But went looking for this as it appears that faker is also not up to date. Faker has a fake.color method in the latest version. The Pythonista version does not have it.
But anyway, would be nice to see console colors supported with single calls instead of what I did above. If it is already, sorry. I did read the docs and try. (Admittedly, I rarely use console colors, just for debugging)
Edit: v in script is a hex string
After working a bit with the UI editor I would suggest adding these features:
- Provide a view type which can serve as placeholder for a subview which is defined in another pyui file. This way you could easily re-use subviews.
- Allow several items in a view to be simultaneously selected, cut and inserted into another view. This would make refactoring view a LOT easier.
- Provide the icon for the action menu while the UI editor is active. Otherwise I always have to switch to a tab with a Python script before I can start my app using an action icon.
Allow several items in a view to be simultaneously selected, cut and inserted into another view. This would make refactoring view a LOT easier.
This is already possible. Tap and hold on an empty part of the canvas, then you can drag a selection rectangle to select multiple views. Tap again on the selection to copy them. Then tap and hold on an empty part of the canvas (possibly in another file) and select Paste from the menu.
In Pythonista's Matlab documentation under Toolkits two mapping libraries are mentioned. Both seem to require Proj4 and Shapely that hooks into the GEOS C++ library. So I can't actually use Cartopy or Basemap toolkits. I'd pay extra for the toolkits to have all of their dependencies met in Pythonista or some kind of add-on. I can see a lot of terrific field and data collection uses with these toolkits.
I would love to be proven wrong if it is actually possible to get these toolkits to work.
When opening (and not neccessarily modifying) pyui files the order in which the JSON is written out to file does not seem to be preserved. So, I do get changes in GIT commits that are not real changes:
Would it possible to sort the attributes by name before streaming them to file? Thanks!
Please add background_color support for ui.ListDataSource cells.