Bug list for beta release 160037
I figured I would start a thread to document bugs in one place.
160036160037 (starting to test in 2.0):
extended keyboard still does not work in console on iPad 3/ios8. On Ipad 3, typing a two single quotes after an equal sign in the editor results in
=''. pressing a space before the = properly inserts a pair of quotes.
- On Ipad 3, fullscreen convert_point, convert_rect, do not work correctly in fullscreen. see here. This was a bug in 1.5 as well, though I thought it was fixed in a recent beta build
- Similar problems with convert_point converting from a
sheetto None.. the result has the sheet screen position added in twice. Thus 0,0 gets converted to (2x,2y) instead of (x,y)
View.closedoes not work for panel mode (not new)
- Keyboard focus stays in editor, but shows console
Keyboard displays white keys after dismissing view.
- View.touch_enabled = False has no effect:
>>> v=ui.View() >>> v.touch_enabled True >>> v.touch_enabled=False >>> v.touch_enabled True
- popover_location does not accept ui.Point [verified in 2.0]
SegmentedControl().subviews does not work properly
- image_quad from arguments are incorrectly scaled. (workaround seems to be to multiply by 2, though i suspect this may depend on device)[not tested yet in 160037]
- ui editor does not save the currently editing view when switching focus to console (unlike script editor, which does). This leads to confusion when loading/presenting a view from the console( why the $!?& is the button action i added not getting called?). It does seem to save when switching to a different file tab. Seems like whenever console input gets focus, play is pushed, or an action run, any dirty files should be written to disk first.
- editor strips off trailing newlines from files.
- syntax highlighting for multiple same line imports (
import ui, os) only highlights first module
- SpriteNode without a texture=None does not work.
- IndentationErrors in the traceback viewer do not navigate to, or highlight the offending line, despite listing the line number in the traceback.
- TableView does not honor
- ~~App Extension does not work on 32 bit devices. ~~
- autocomplete in console: autocomplete after an equal sign (without a space) results in whole line getting replaced.
- If a quote is opened in the console input, copy/paste from the console does not work (copy is from the input, not output)
- scene.ShapeNode requires a
pathargument, otherwise attribute error occurs.
- Vector2, etc type error when using future.division.
- Rect.inset does not work correctly when the Rect has negative widths (need to change sign of inputs)
- (suggestion) Views presented as panel should have the "dock" button to return to the editor (rather than first tabbing to console). This goes for webbrowsers too.
- (suggestion) option to open contextmenu help in docked doc window rather than popover quickhelp. or, a button in quickhelp to open same page in full docs.
- (suggestion) ability to manage
- (suggestion) Community forum link should open in an internal webbrowser, rather than launching safari. Or, this should be an option. With the new docking mode, it is now much easier to paste back and forth between editor and forums.
convert_point and convert_rect do not work properly with a None argument if the view is a
sheet. not as bad as fullscreen, but there is an extra offset equal to the top left corner, as if that were being accounted for twice.
The files window ion an iPhone 6+ is not as wide as the screen. A stripe of the file screen shows on the right. I hope this is a bug. I'd rather have the full width of the screen to show longer file names.
@zencuke this is not a bug. It's more obvious on iPad, but it's a conscious UI choice.
Missing documentation. The current process for adding an icon to execute an extensions script directly doesn't seem to be documented. I think the current documentation refers to an earlier process. I looked in "Pythonista Modules/appex - Using the Pythonista Sharing Extension" doc and .extensions/_Readme.md and didn't see it in either place.
@Webmaster4o: Intentional or not I'm having difficulty understanding the value of this. The tiny view of the file on the right adds no useful functionality to the UI. It just takes away functionality from the file list window. The iPhone screen is small as it is. Squeezing it even more is a pain, especially for no benefit. It may mean something on the iPad but it looks like a bug on the iPhone. It is bad enough on the iPhone 6 plus. It must be even worse on smaller iPhones like the regular iPhone 6. The edit window gets a whole screen. The console and doc screens get to be full width but for some reason the file list has to be narrower? With no useful functionality in exchange? Makes no sense.
Not sure if this is a bug or just not well documented. in the latest beta, wait_modal seems to stop any ui.in_background from getting executed until after the view is closed.
grab the name [ ... ] and navigate there in stash.
Means type the following into stash:
cd /var/mobile/Containers/Bundle/Application/C370CA19-1410-4DA3-975F-CBA563809E66/Pythonista.app/Frameworks/PythonistaKit.framework/pylib/site-packages/ ls
I had no idea about this! Thx!
I love the the possibilities offered by obcj_util. While exploring these, I ran into an error.
I managed to end up with an ObjCInstanceMethod without method attribute, which (not surprisingly) makes Pythonista exit when called
>>> f = ObjCClass('UIDevice').currentDevice().batteryMonitoringEnabled >>> f.encoding 'B0@0:0' >>> f.method Traceback (most recent call last): File "<string>", line 1, in <module> AttributeError: 'ObjCInstanceMethod' object has no attribute 'method' >>> f() Bye bye
I believe this is causes by the final if statement in ObjCInstanceMethod._ _ init _ _ in objc_util, which neither assigns self.method nor raises an exception in case self.encoding is True-ish.
I guess this should be something like
if method: self.method = method if not self.encoding: self.encoding = method_getTypeEncoding(method) else: raise AttributeError('No method found for selector "%s"' % (self.sel_name))
Alternatively, ObjCInstanceMethod._ _ call _ _ could check.
My details: iOS 9.1, iPad Air 2, Pythonista Beta 160036
@Olaf Thanks, looking into it now. The problem seems to be that
batteryMonitoringEnabledis a property, and uses a custom selector name (
Yes, @omz, you're right on
batteryMonitoringEnabledis a property, and uses a custom selector name (
I found this isn't unique to battery. The same happens for property
AVCaptureDevice.connectedthat needs translation into method
isConnected. I noticed it happens to boolean properties, as e.g.
Hope this helps
import ui ui.SegmentedControl().subviews
/Users/ole/Development/xcode/Pythonista/python/Objects/tupleobject.c:54: bad argument to internal function
- image_quad from arguments are incorrectly scaled. (workaround seems to be to multiply by 2, though i suspect this may depend on device)
- ui editor does not save the view when switching focus to console. This leads to confusion when loading/presenting a view from the console( why the $!?& is the button action i added not getting called?). It does seem to save when switching to a different file tab. Seems like whenever console input gets focus, play is pushed, or an action run, any dirty files should be written to disk first.
I've mentioned this before in a different thread, but the "replace" text input dialog in the find/replace has a few problems. First, it has no default text as find does.
Second, if you compare the keyboard to the keyboard in the "find" dialog, there are 2 differences. In replace, autocapitalize is on, and dark keyboard themes are not respected. The opposite is true in the find box.
Bug in the
The documentation for
SpriteNodestates, that a node without texture is rendered as a rectangle with the color of the color attribute. However creating a
SpriteNodelike this creates an error:
node = SpriteNode(texture=None,position=(10,10),color='blue') TypeError: Expected Texture or image name.
@Moe a workaround: omit the texture argument if you don't want a texture.
ui.TableViewdoes not respect either
flexattributes. Meaning, it never resizes if you do it programmatically. I haven't tried it another way. A work-around for those wondering:
table = ui.TableView() table_pntr = ObjCInstance(table) table_pntr.frame = CGRect(CGPoint(0,0), CGSize(500,500))
Also, can we get a
blmacbeth, the issue seems to be that these are not accepted in the constructor. However, setting .frame and .flex attributes after you create the TableView works fine.
import ui v=ui.View(frame=([0,0,200,200])) t1=ui.TableView() t1.frame=(0,0,200,200) t1.flex='w' t2=ui.TableView() t2.frame=(0,250,300,300) v.add_subview(t1) v.add_subview(t2) v.present('panel')
I have noticed that sys.lath no longer contains . or Documents.
I thought in 160032 this was changed to
- Changed the order of
sys.pathonce more, so that files in the main documents folder can't shadow standard library modules anymore. Imports from the current directory should also work again.
which I think had documents and '.' just at the end...
- Changed the order of
@JonB The directory of the current script is still in
sys.path, just as an absolute path instead of
.. I don't remember the details right now, but there were some subtle problems with having
I think Documents used to be in the import path, but I don't really think it should be there. That's what site-packages is for.
There's still that bug in syntax highlighting where if you have multiple same-line imports (
import ui, os) only the first module will be correctly highlighted.