Welcome!
This is the community forum for my apps Pythonista and Editorial.
For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.
New Beta for Pythonista 3.3
-
Hi @omz ,
if I move the main_view creation into the global scope (i.e. out of the main function) it also crashes.There is another issue with the newest BETA: When you create a custom view (extending ui.View) and add with the help of objc_util a native KeyCommandsView as a subview into that custom view. With the newest BETA that does not work anymore. Whereas it worked with the Beta before and with the current production version. I guess that you also added a KeyCommandsView into the ui.View and it consumes all key events, so the self-done-native way is not working anymore when using a custom view. When not extending the ui.View (e.g. using a pure ui.View) and adding the KeyCommandsView to it, the self-done-native way still works.
Could you also do something for this second issue ?
test case example of the second issue:
# coding: utf-8 from objc_util import * import ui import console UIKeyCommand = ObjCClass('UIKeyCommand') modifiers = {(1<<17): 'Shift', (1<<18): 'Ctrl', (1<<19): 'Alt', (1<<20): 'Cmd', (1<<21): 'NumPad'} def keyCommands(_self, _cmd): keys =['A'] cmd_key_flag = 0 key_commands = [] for k in keys: key_commands.append(UIKeyCommand.keyCommandWithInput_modifierFlags_action_(k, cmd_key_flag, 'keyCommandAction:')) commands = ns(key_commands) return commands.ptr def canBecomeFirstResponder(_self, _cmd): return True def keyCommandAction_(_self, _cmd, _sender): self = ObjCInstance(_self) key_cmd = ObjCInstance(_sender) flags = key_cmd.modifierFlags() modifier_str = ' + '.join(modifiers[m] for m in list(modifiers.keys()) if (m & flags)) key_input = key_cmd.input() console.hud_alert(str(key_input)) KeyCommandsView = create_objc_class('KeyCommandsView', UIView, [keyCommands, canBecomeFirstResponder, keyCommandAction_]) class CustomUIView (ui.View): def will_close(self): pass @on_main_thread def main(): #this does not work anymore in latest Beta. E.g console.hud_alert('A') is not called anymore main_view = CustomUIView(frame=(0, 0, 400, 400)) #this still works. console.hud_alert('A') is called #main_view = ui.View(frame=(0, 0, 400, 400)) v = KeyCommandsView.alloc().init() v.becomeFirstResponder() ObjCInstance(main_view).addSubview_(v) main_view.present('sheet') if __name__ == '__main__': main()
-
Hi @omz,
I have a weird bug... I was working on one of my projects with pyui files. I wanted to change the name of the component (a table view) and to my surprise it deleted the component. Actually, it deleted the component because of the backspace keystroke (since I wanted to change the name). Then I realized that also, any of the direction keys (up, down, left, right) weren’t working as well. All the other keys however are working. I then realized it was the physical keyboard that didn’t work in the pyui file. When I use the on-screen keyboard, everything works including the backspace. And only in the pyui fille display because if, for example, I try to use the backspace key from the physical keyboard from, let’s say the run text field (when you press a few seconds on the « play » icon), it’ll work.Let me know if you need more info.
D -
I tested the new BETA build 330012
it still crashes when I use the in 330007 new introduced key_command feature
Pythonista.app completely exists when pressing the 'a' key on the external BT keyboard
# coding: utf-8 import ui import console class UIView (ui.View): def get_key_commands(self): print('get_key_commands') return [{'input': 'a'}] #return [{'input': 'a', 'modifiers':'cmd'}] def key_command(self,sender): print('key_command='+str(sender)) def main(): main_view = UIView(frame=(0, 0, 400, 400)) main_view.name = 'Key Commands Demo' main_view.present('sheet') if __name__ == '__main__': main()
@omz Do you still have some working example code of the new keycommand API ?
EDIT: OMZ wrote me. Although title is optional as written in the documentation, it must be set in the BETA otherwise it crashes.
so the statement
return [{'input': 'a', 'title': 'a'}]
repairs keycommands for the BETA. It will be fixed in the coming builds...
-
Ole Zorn has released the first Beta of the next version of Pythonista which has shortcuts support.
http://www.sirihacks.net/ -
@omz regarding passing output: iOS 13 has API's for that! Please support them! :takemymoney:
-
@omz when is this releasing? Can we get an ipa for the beta cos it’s full
-
Could I also please request that the new "open external file" and "open external directory" api be supported, so I can use Pythonista to access files AND directories in WorkingCopy. Yay Cheers Dave.
-
Will this version will support Pandas ?
-
@manitsy, no.
Use Google to search for ”Pythonista issues Pandas”.
-
Just purchased Pythonista 3 and its 3.2 (I had an earlier version as well)
Is this correct 3.3 still not released?
Many Thanks -
@eskdale yes, 3.3 is in beta mode, hoping released soon
-
Is there a release timeline? The beta is full and I would like to be able to take advantage of the keyboard.
-
@videoMonkey All we can say is that current beta build expires in 61 days
-
Beta has expired....Any way of renewing?
-
@robertiii no, but we hope the definitive version will arrive soon
See also this topic
-
Any news?
-
@ltddev No but it will come soon. Here is what ole said about "dark mode support", some days ago:
"This is the last feature I wanted to put in the 3.3 release because it's obvious and easy. I still need to make some cuts elsewhere, but I'm happy with this overall, and some future plans and new perspectives are starting to take shape."
Thus, we can be optimistic
-
"There's many a slip 'twixt the cup and the lip"
Please everyone continue to be patient and compassionate - Ole has publicly said that recent delays are due to his mental health and other personal reasons. It takes time to come back from that kind of thing and the path is rarely linear so his recent progress with feature development and his high levels of communication on Twitter should not be seen as guarantees.
Love to all
-
Ole just tweeted that he plans to submit 3.3 to the app store over the weekend, with a new Test Flight version also being available at that time too! Release notes shown in his tweet as well.
Super exciting! Looking forward to official 3.3 next week hopefully!
Congrats Ole!
-
@Zoot can you clarify the meaning of, "...a new Test Flight version also being available at that time too!"?
My understanding would be once the code goes golden in the app store, it means the release is no longer "in beta" and if that is the case, beta testing for this release is effectively wrapped up and Ole does not need beta testing any more and a beta build would cease. If that is the case, what is the purpose of a "new Testflight version"?