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.
Outliner with drag/drop reordering - part 2
-
@smh said:
load_framework('EventKitUI')
I don't know why this line could give a problem on a Mac, sorry
You could try without this line, sometImes the framework is loaded by default
-
@smh said:
does using emoji break bullets/cause weird line break issues for other users?
I don'T understand, sorry
-
@cvp if I open one of my outlines that has about 14 lines in it and I position the cursor to the end of the first line the keyboard comes up but the outline is pushed up such that the insertion point is no longer visible. This is on an iPhone in portrait mode.
-
@ihf just tested and I see. What is weird is that if you scroll and retry to put your cursor at first line, the problem does not occur anymore. Annoying, I hate this kind of bugs
-
@cvp there is a problem when I type a long line (at least on the iPhone in portrait mode). When I get to the right side of the screen, the line is continued on the next line but the insertion point goes away (although the keyboard is still visible). In other words, I can’t type a line that has the automatic returns in it unless I position the insertion point after the word that has been moved to the next line.
-
@ihf said:
if I open one of my outlines that has about 14 lines in it and I position the cursor to the end of the first line the keyboard comes up but the outline is pushed up such that the insertion point is no longer visible. This is on an iPhone in portrait mode.
That happens only the first time when the keyboard is not yet appeared and my program does not know its height and the foreseen process to automatically scroll up to show a line under the keyboard is executed when it should not. Annoying, I'll check if I can correct it quickly.
-
@ihf V01.20 and outline.versions with
Version V01.20 - correction of bug "before the keyboard has appeared a first time, the first edited outline is automatically scrolled up erroneously"
For your information, I get the keyboard height in keyboard_frame_did_change but this function is only called when the keyboard appears. I need to know this height because if you edit a row that would be hidden by the appearing keyboard, the row needs to be automatically scrolled up above the keyboard. But if you edit a row before the keyboard has appeared the first time, this height is not yet known. Thus I force the keyboard to appear and immediately be dismissed without we see it by creating, edit, end, delete a TextField during the general ui.View initialization. Magic, isn't it ?
-
@cvp Thanks for the quick fix to the scrolling problem. The lost insertion point on long lines that i mentioned above also occurs on the iPad in landscape mode.
-
@ihf said
there is a problem when I type a long line (at least on the iPhone in portrait mode). When I get to the right side of the screen, the line is continued on the next line but the insertion point goes away
I've seen that, and also on iPad as you said.
And you added
although the keyboard is still visible
Sure of that? For me, keyboard disappears
-
@cvp I just tested it again on the iPhone and confirmed that the keyboard remains visible although the insertion point disappears.
-
@cvp Probably an old Pythonista problem, but I just started a new outline entered three lines and then hit enter and Pythonista crashed.
-
@ihf said
Probably an old Pythonista problem, but I just started a new outline entered three lines and then hit enter and Pythonista crashed.
Unfortunately, this does not seem to be in my hands
But, anyway, try to check the reason in objc_exception.txt or faultlog folder
-
@ihf V01.21 and outline.versions with
Version V01.21 - correction of bug "when typing a long line automatically splits the line, the keyboard sometimes disappears and cursor is no more visible"
As I can't reproduce your problem (in my case, keyboard disappears), perhaps this correction does not solve your bug (but only mine). Please, give me some feedback
-
@cvp I tested v1.21 on the iPad and the keyboard remained visible (although it seemed to go away and come right back). So that seems to be fixed (I will test on the iPhone). However, I had a different (new?) problem. I added an item and then tried to move it by holding and dragging it. It looked like it was working, but when I released it, I got an error. Here is the traceback:
Traceback (most recent call last): File "/private/var/mobile/Containers/Shared/AppGroup/05D14C00-CCAC-4E98-A3CC-96C6944B8534/Pythonista3/Documents/outline.py", line 3199, in tableview_cell_for_row v = MyInputAccessoryView(row) File "/private/var/mobile/Containers/Shared/AppGroup/05D14C00-CCAC-4E98-A3CC-96C6944B8534/Pythonista3/Documents/outline.py", line 476, in __init__ self.width = mv.get_screen_size()[0] # width of keyboard = screen File "/private/var/mobile/Containers/Shared/AppGroup/05D14C00-CCAC-4E98-A3CC-96C6944B8534/Pythonista3/Documents/outline.py", line 1132, in get_screen_size app = UIApplication.sharedApplication().keyWindow() File "/var/containers/Bundle/Application/8778D1CF-1C08-48BA-9714-9D2CFE524EA1/Pythonista3.app/Frameworks/Py3Kit.framework/pylib/site-packages/objc_util.py", line 801, in __call__ ordered_args = list(args) + [kwargs[key] for key in kwarg_order] TypeError: 'builtin_function_or_method' object is not iterable
-
@ihf said
Traceback (most recent call last):
File "/private/var/mobile/Containers/Shared/AppGroup/05D14C00-CCAC-4E98-A3CC-96C6944B8534/Pythonista3/Documents/outline.py", line 3199, in tableview_cell_for_row
v = MyInputAccessoryView(row)
File "/private/var/mobile/Containers/Shared/AppGroup/05D14C00-CCAC-4E98-A3CC-96C6944B8534/Pythonista3/Documents/outline.py", line 476, in init
self.width = mv.get_screen_size()[0] # width of keyboard = screen
File "/private/var/mobile/Containers/Shared/AppGroup/05D14C00-CCAC-4E98-A3CC-96C6944B8534/Pythonista3/Documents/outline.py", line 1132, in get_screen_size
app = UIApplication.sharedApplication().keyWindow()
File "/var/containers/Bundle/Application/8778D1CF-1C08-48BA-9714-9D2CFE524EA1/Pythonista3.app/Frameworks/Py3Kit.framework/pylib/site-packages/objc_util.py", line 801, in call
ordered_args = list(args) + [kwargs[key] for key in kwarg_order]
TypeError: 'builtin_function_or_method' object is not iterableI already got that, not reproductible. Not in my code. I personally think that Pythonista has a lot of problems with iOS/ObjectiveC next versions. Sorry for you, but one more time, I think it is not in my hands.
-
@cvp I am not sure what to make of this but I am testing on an iPad and the auto update does not seem to work properly. When I start the script it tells me there is a new version and asks whether I want to update. I say yes and it comes back and says the update was done and to restart the program and I restart it as I do on my other devices. However the update does not seem to take and it goes through the same cycle again. This happened with the previous release and I thought that I would just do a manual update to 1.20 but it is now happening again with 1.21. It’s obviously not a big deal as I can always do the manual update but I thought I would mention it.
-
@ihf said
I am not sure what to make of this but I am testing on an iPad and the auto update does not seem to work properly. When I start the script it tells me there is a new version and asks whether I want to update. I say yes and it comes back and says the update was done and to restart the program and I restart it as I do on my other devices. However the update does not seem to take and it goes through the same cycle again. This happened with the previous release and I thought that I would just do a manual update to 1.20 but it is now happening again with 1.21. It’s obviously not a big deal as I can always do the manual update but I thought I would mention it.
Is your outline.py local or on iCloud, I got tHe same problem, only once, but my script is on iCloud and download from GitHub to iCloud was done but perhaps not yet to your local device.
If your script is in your local Pythonista, was it edited in a Pythonista tab or run from a shortcut?
When you restart, do you remove Pythonista from memory first? If no, not sure Pythonista does not have a cache.It is always better to remove it from memory because if the script changes in some created ObjectiveC classes, they are not replaced without restarting Pythonista it-self.
Are you waiting some time before to restart?
-
@cvp I have 2 iPads and on the old iPad Pro, the auto update always works. (I run Outline.py that is in a tab, it asks if I want to download, I say yes, and I get a message saying the download completed and I restart the program. After I restart I am running the new version (I don't even have to quit Pythonista, just the script). On the newer iPad, I do the same exact thing except that when I restart the program it has not been updated. Weird.
-
@ihf The only difference I could see between your two devices is their speed, if you are running really on the two devices an edited script. I thought you used a shortcut to start the Pythonista script via its url scheme, and in this case you may run a not edited script.
You did not answer if the script is stored in iCloud or in a local folder. If it is in iCloud, the first device which will download the new version from GitHub to an iCloud folder would have done the job for the second device.
Anyway, I would prefer that you don't restart the script without restarting Pythonista it-self becuse, as explained in my previous post, if the new version changes code of a created ObjectiveC class, you need to restart Pythonista to use the updated code. -
@cvp The script is local on both devices and the outlines are on iCloud. On the newer iPad Pro, watch time I run v 1.20 it says that v1.21 is available and then says it is downloaded and after I restart the script, it repeats. Restarting Pythonista does not help.