Beta Status Update
@omz The workaround worked for me. Thanks.
On the new scenekit, I haven't been able to get gravity to work. I tried to modify the Physics Clock demo to add gravity from motion, but using self.physicsgravity = motion.getgravity()[:2] doesn't seem to work; in fact self.physics_gravity = (5,-5) or something similar does not work either. Numbers still fall straight down. Am I missing something?
Not sure why this doesn't work for you, here's a slightly modified PhysicsClock script that uses motion data for changing the gravity:
@omz - yes the workaround fixes the problem. It also shows how to select the soundfont! Thanks!
Not sure if a new thread is in order... But here are a few observations about the new beta...
- in general ... Wow! Looking amazing.
- console: I thought in the old pythonista, there was a way to quickly clear the current input line. For instance, when you press the up arrow for history, pressing down repeatedly should bring you back to an empty line. This sometimes works in the beta, but only if you had previously typed an empty line!
- console history: I admit I liked the history that popped up partial completions. Arrows are nice too, but there were times when a histiry popup was nice.
- console: raw_input should give some indication that console is in input mode? I can't remember what 1.5 did, but I thought something changed.
- thank you for sound.Player.finished_handler! Should the MIDIPlayer have something similar?
- ui.Point, and ui.Size, etc are nice... however it seems like they should be tuple-like since some functions require tuples. For backwards compatibility, seems like slicing would need to be implemented. Then again, I guess adding tuples and adding vectors are very different operations, so maybe forcing people to cast as tuples if they want to slice is a reasonable compromise.
- several ui functions or properties, like ui.convert_point, content_offset, frame, bounds expect a tuple, yet return Point or Rects.
- bug: globals are cleared on run from editor, even if that setting is off. Running from action menu doesn't clear globals. This was breaking stash, and other Views run in panels, when suddenly imported modules were no longer in globals.
- I like the traceback browser, and it's ability to open files, however it seems like some errors are caught by the traceback without giving any indication to the user that there was an error. In 1.5 I think the editor or console would swipe into view when errors occurred. That could sometimes be annoying, and in certain cases made it hard to debug/stop a View... but we do need some indication of an error when in Views. Perhaps popover the traceback thingie onto the current view?
- getkbframe and convert point now work in fullscreen.
- still a problem - cannot use custom touch methods in a View presented as a panel, because the panel wants to slide to editor, and steals the touch events. Perhaps disable this feature when a View has touch handlers, and only slide using the top bar area?
- i like the ability to have more than one tabbed ui.View/Doc/webbrowser... but without View.close(), things get cluttered quickly. Is there a way to programatically define whether a View gets its own tab, or reuses an existing slot? Or a way to close tabs programatically? For instance, I'm thinking if two views have the same title, presenting the second view should not create a new tab. That way, generic untitled views always go to the same spot, while utilities can stay open.
- I understand editor actions.... But what are file actions, and how do I use them? Maybe I'm missing where the file action menu lives?
- is there a pythonista version number accessible via sysconfig or somewhere else? That could be useful for writing backwards compatible code, though I realize we can try importing some of the new modules.
Also.. Does the platform game example work for anyone? I'm on ipad2, and I just get a gray screen.
@JonB I wanted to report that as well. Gray screen, but the sound plays.
iPad mini 2, iOS 8.1.
Example "Random MIDI Melody.py" will close Pythonista immediate after start. Anyone seeing this behaviour as well? (iPad Air 2).
Edit: There is even no output.mid file created
bottle(still not current with pypi) and
bs4and then halts on
cffibecause that module is no longer included in Pythonista.
@JonB #Moe I get the grey screen as well on the platformer example. iPad Air.
I also added:
modules += '''appex cb ctypes dialogs sk'''.split() # modules added in Pythonista v1.6 Beta
pythonista_undocumented.pybut I also opened a new issue because I now realize that pythonista_undocumented is doing an incomplete job by overlooking class methods. Any pull requests to close that issue would be gratefully accepted.
@omz excellent changes, this is a major release thanks, please if it's possible add:
- line numbers on iPhone 6/6+
- Ability to set or get from the clipboard any object, not only text and images.
It would be really helpful!!!
Where exactly are the "File Actions" meant to appear?
I had this same question. In the built in file browser, when you hit "edit" such as to move or delete groups of files, there is a new "share" icon, which now shows custom actions underneath.
On an iPhone 6 in the editor screen when you tap "+" in the top bar a view appears which has a "Files" Menu choice (It shows in the images and sounds tabs.) What is this for? When I select it I see an empty view. I think there was an image in it right after I installed the beta but it is gone now. All of the visible icons when tapped change the view. There is apparently no functionality in this view. There is a search control in the top bar but it doesn't seem to do anything.
Side note: I'm curious what this view looks like on an iPad.
On iPhone 6 in the file edit view if the keyboard is not displayed the "+" icon doesn't do anything.
The Files section is supposed to show image and sound files in the folder of the current script (and subfolders). If there aren't any, it might be empty (though the whole section is actually supposed to be hidden then ... it looks like this isn't working properly right now).
This might not qualify as a bug but on the iPhone 6 in edit file view the gesture to make the keyboard go away is quite touchy to figure out. There is no longer an icon to make the keyboard go away. Apparently now you need to drag it down. However it is not clear what exactly needs to be dragged. Trying to drag the keyboard itself generally types something wiping out what is selected. (BTW: Thanks for undo now that I found it again.) Starting a drag in the content area usually works but is sometimes interpreted as a select or scroll. The old keyboard icon took valuable space but it was nice and reliable. Tap and the keyboard is gone.
Also the animation is unexpected. First the keyboard reduces to a single line (the top line) then after a short pause that line goes away.
The cb module , and your heart-rate monitor example is working great with the Wahoo TICKR heart monitor strap! Thank you!
Bug: I was adjusting the order of editor actions, moving the default ones to the bottom of the list. Suddenly only the last script in my list was available . I removed and readded mine (about 6) but still only the last one is available for selection. They still show up in the editor action list in settings though.
Still a bug: In one of my editor scripts I still get a row_height of -1 from a TableView. Now it actually seems to never be set. I'm manually setting it during init at the moment. I checked the value in did_load() and layout(). Btw my editor script presents a view. I get a -1 if run directly as well. I have reported this in previous versions of 1.6. The height worked in 1.5 but other issues prevented this script from working before.