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
-
@cvp By the way, I know I keep telling you about bugs/anomalies but I should also say that I am using Outline for actual work and it is already enormously helpful. Thank you!
-
@ihf said:
On the iPad when I open an existing Outline in Landscape mode that is longer than 1/2 the screen, the keyboard hides the portion of the Outline at the bottom where you would add new items.If I then hide the keyboard, the full outline appears and then if I touch the text in the last item, the display changes to show only the last 2 lines of the outline. If I hide the keyboard at that point, I get the Outline back but if I touch text again the keyboard comes back with 1/2 the outline and it cannot be scrolled at all.
See you next week...
-
-
@cvp Glad to see you are maintaining your sense of humor :-)
-
@ihf said:
Question: what are the .old files that are being created (and which I delete)?
Each time that the program saves a couple of files (txt and content), the program
- deletes the old files
- Rename actual files into .old
- Saves files
This is a protection against a crash during saving, which could generate a loss of the files.
Thus, you don't need to delete them your-self.
If you prefer, I can comment this process (I have tested their duration: some hundredths of second).
-
This post is deleted! -
@ihf The outline file is showed in an ui.TableView which normally is used to display a set of rows without editing their content, delete excepted. No editing, thus no keyboard.
Manual scroll shows as maximum the last row at the bottom of the screen, not in the middle of the screen because no keyboard would be displayed.
In our case, in each displayed row, the script creates an ui.TextView to allow edition of texts.
Then, the keyboard appears.
I'll try to allow manual scroll so the last row would be just above the keyboard, but nothing promised.I'll try by setting the bottom contentinset of the TableView a value equal to the height of the keyboard
-
@ihf New V00.49 available with
Version V00.49 - correction of bug "scrolling not allowed when keyboard hides row to be edited" by setting tableview content inset bottom = keyboard height
Please try if the problem of "unallowed scroll when keyboard appears and hides outlines you want to edit" is solved
And tell me... -
@cvp First test: iPhone, Portrait mode with outline that fills a little over 1/2 of the screen. If insertion point is at end of 1st item, cannot scroll outline. Hide keyboard, outline visible. Touch 2nd to last item, cannot scroll though swiping (not scrolling) works sometimes. Also, sometimes when I swipe the outline up it scrolls one of the items near the bottom of the outline rather than the outline.
I’ll try more tests with iPhone and iPad. -
@ihf said:
cannot scroll though swiping (not scrolling) works sometimes.
What's the difference between scroll and swipe?
Swipe vertically a scrollview scrolls it.Sorry, but I don't understand what you want to do and what doesn't work.
-
@ihf said:
it scrolls one of the items near the bottom of the outline rather than the outline.
No comprendo
-
@ihf When you have installed V00.49, did you restart Pythonista because, if we change keyboard_frame_did_change code (what V00.49 does), Pythonista has to be reloaded.
-
-
@cvp, impressive! Know how hard these seemingly simple things can be.
-
@mikael said:
Know how hard these seemingly simple things can be.
Don't forget that I'm not a pro, it took hours of sweat for me, perhaps done in a few minutes by an expert. The problem was this mixed of TextView in a TableView...
-
@ihf Please give me some (good 😀) news about your problems of scrolling with keyboard because, for me, I don't see any issue since V00.49, and also the added button for dismissing keyboard on iPhone.
-
@ihf said:
I save an outline to iCloud on iPad and then go to IPhone but do not see the outline I just saved. Is it now necessary for me to go back to Files to download it? That may be outside your control but it is very inconvenient to always remember to do that if you are going from one device to the other.
Perhaps you have seen this topic, written after my search and tests to solve your issue.
Will be integrated in a future versionAnother problem is that if you try to select via Pythonista, you don't see the unloaded iCloud files.
You would need to select via the Files app like dialogs.pick_document does but this one does not
show The Pythonista local files...
Incoherence
If you want an unique way- either no Pythonista local files (dialogs.pick_document)
- either no unloaded iCloud files (my files_picker)
Try this script, it downloads a selected file if not downloaded.
import dialogs #import shutil fil = dialogs.pick_document(types=['public.item']) print(fil) #shutil.copy(fil,'test')
I think personally that the best solution for you would be to use files_picker for local files and dialogs.pick_document for other Files app files, then two different ways but you would not need anymore to care about downloaded or not.
-
@cvp With regard to the scrolling, I just tested on the iPad and it works except that if I am looking at the outline which takes up more than 1/2 the screen and I select a line which is below the midpoint,, the keyboard will appear (as it should) and obscure the line I selected. I can then scroll the outline up to see it but it would be better, if possible, if the view scrolled in such a way that the selected line was visible when the keyboard appears.
However, when I went to the iPhone and selected open I got this error:
Traceback (most recent call last): File "/private/var/mobile/Containers/Shared/AppGroup/6CCAAFF1-947E-4DC8-B33B-58EE87A0823C/Pythonista3/Documents/outline.py", line 1427, in tableview_did_select self.files_action(None, act) # no need to pass waited sender File "/private/var/mobile/Containers/Shared/AppGroup/6CCAAFF1-947E-4DC8-B33B-58EE87A0823C/Pythonista3/Documents/outline.py", line 1552, in files_action f = File_Picker.file_picker_dialog('Pick a text file', root_dir=self.path_to_name) File "/private/var/mobile/Containers/Shared/AppGroup/6CCAAFF1-947E-4DC8-B33B-58EE87A0823C/Pythonista3/Documents/File_Picker.py", line 378, in file_picker_dialog picker = TreeDialogController(root_node, allow_multi=multiple) File "/private/var/mobile/Containers/Shared/AppGroup/6CCAAFF1-947E-4DC8-B33B-58EE87A0823C/Pythonista3/Documents/File_Picker.py", line 184, in __init__ self.expand_root() File "/private/var/mobile/Containers/Shared/AppGroup/6CCAAFF1-947E-4DC8-B33B-58EE87A0823C/Pythonista3/Documents/File_Picker.py", line 187, in expand_root self.root_node.expand_children() File "/private/var/mobile/Containers/Shared/AppGroup/6CCAAFF1-947E-4DC8-B33B-58EE87A0823C/Pythonista3/Documents/File_Picker.py", line 113, in expand_children node = FileTreeNode(full_path, self.show_size, self.select_dirs, self.file_pattern,self.only) File "/private/var/mobile/Containers/Shared/AppGroup/6CCAAFF1-947E-4DC8-B33B-58EE87A0823C/Pythonista3/Documents/File_Picker.py", line 79, in __init__ self.subtitle = human_size((os.stat(self.path).st_size)) PermissionError: [Errno 1] Operation not permitted: '/private/var/mobile/Library/Mobile Documents/com~apple~CloudDocs/'
-
@ihf said:
when I went to the iPhone and selected open I got this error:
I don't know why but, on iPhone, iCloud Drive not seen as a folder but as a file...by Pythonista file system operations os.path.isdir
Edit: see two posts below in V00.52 explanation
-
@ihf New V00.51 available with
Version V00.51 - protection against crash on iPhone when open a file. On iPhone, iCloud Drive folder is not seen as a folder by os.path.isdir(). => Support only Pythonista local and iCloud files
I know that it could be annoying if you want to store files in "on my iPhone" or "iCloud Drive" and access them on your iPhone, but I can't do anything actually.
And this does not yet solve the problem of files created on iPad in Pythonista iCloud and not visible in iPhone. I shall solve that with dialogs.pick_document but later.