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
Is that self.tvo.reloadRowsAtIndexPaths_withRowAnimation_
method being called on the main thread? It probably needs to be.Alternatively, you might try explicitly calling ns([nsindex) and setting to a variable, rather than letting auto_wrap handle it. I can't think why that would matter, but you might end up with a clearer stacktrace.
Also, it would let you wrap a try/except around the ns() itself, and print out nsindex in the cases where you get an error. Maybe nsindex is the wrong type, etc.
-
@JonB said:
reloadRowsAtIndexPaths
Code is
def tableview_reload_one_row(self, row): self.cursor = (row,0) # not needed else if reload done #print('tableview_reload_one_row',row) NSIndexPath = ObjCClass("NSIndexPath") nsindex = NSIndexPath.indexPathForRow_inSection_(row,0) UITableViewRowAnimationNone = 5 #self.tvo.beginUpdates() self.tvo.reloadRowsAtIndexPaths_withRowAnimation_([nsindex], UITableViewRowAnimationNone) #self.tvo.endUpdates()
method being called on the main thread?
It is not but I don't think it needs to be
And don't forget this problem does not occur frequently but only after we run the script several times in the same Pythonista run...
Anyway, I'll follow your advices:
- main thread
- try/except
For your info, if I force index to be bigger than table length, I don't have any Python error but an ObjectiveC crash with
The app was terminated due to an Objective-C exception. Details below: 2021-08-30 11:43:15.181473 attempt to delete row 100 from section 0 which only contains 39 rows before the update
Remark the word delete even if I don't access the TableView for deleting !?
-
@ihf No new version today, perhaps first time 😂
Jus to show that I don't do nothing, busy to study external keyboard keys combinations
And I count on you to propose the choice of actions, even from top menu...I'll have to program each case but not a big effort (I hope) -
@cvp this looks like a good list of actions. Are show children and hide children the same as the existing menu items show all and collapse all?
-
@ihf said:
Are show children and hide children the same as the existing menu items show all and collapse all?
No, they are the same as in the popup menu of a tapped outline.
BuT they are not yet programmed, they are there are examples. please choose which actions you would want to see there, from any pressed button or menu option chosen. And then I could say if they are possible to be simulated. -
@cvp Show All and Collapse All would be useful keyboard shortcuts. I am using an external keyboard right now and will think about how often I use menu items that might be executed from the keyboard.
Wish list: searching across outlines.
-
@cvp Wish list (that probably is a non-starter): Ability to put an item (text snippet, URL, etc.) in an Outline via the Share sheet (perhaps done using a Shortcut). As I write this I realize that given Pythonista, one problem would be how long it would take to perform this action thus negating its value.
-
-
-
@cvp I know about the magnifying glass and that works well. However, the key word is “across outlines”. In other words, I was referring to the ability to search all outlines at once.
“Non-starter” is an expression for something that can’t be done. -
@ihf said:
ability to search all outlines at once.
Understood, sorry,sometimes outline is a file, sometimes it is a row....
Added in my todo list: your wishes become my todo
Thus:
- in the files menu, new option "search"
- TextField to enter the text
- scan all files of your current folder
- show a list of files containing text
- select a file and open
Confirm?
-
@cvp précisement
-
@ihf 😀 So you are sure I could understand.
Seriously, I still have problems with my dynamic external keyboard keys code but after that, I'll program the search in files, always happy to postpone my debugging of the undo process.
-
@ihf said:
Ability to put an item (text snippet, URL, etc.) in an Outline via the Share sheet (perhaps done using a Shortcut). As I write this I realize that given Pythonista, one problem would be how long it would take to perform this action thus negating its value.
How did you imagine that? Assuming you have a shortcut with the outline program and file name, you still have to say where you want to paste the shared data
-
@cvp My thought was that the snippet would be appended to an outline (perhaps the snippets outline). From there you could use the script to move it within the outline or more likely to another outline.
-
-
@cvp my idea, perhaps not fully thought through, is that you would use the share sheet to add a text or other snippet to an outline. You asked where that would go and I don’t have a better idea than to have a specific outline which we could call “snippets” (or anything) to which it would be appended.
-
@ihf said:
my idea, perhaps not fully thought through, is that you would use the share sheet to add a text or other snippet to an outline. You asked where that would go and I don’t have a better idea than to have a specific outline which we could call “snippets” (or anything) to which it would be appended.
Why not share to "copy" and paste it normally in your outline?
-
@ihf said:
add a text or other snippet to an outline.
In this case, outline is a file or a line of a file?
specific outline which we could call “snippets”
In this case, outline is a file or a line of a file?
-
Version V00.90 - support parametrization of supported keys combinations of external keyboard - use keyboard button in settings window - gray actions have a configured keys combination - swipe left an action and confirm 'disable' to remove it from configured combinations - associating the same combination for two actions is not allowed, when you try, the selected modifier/key will blink before to be unselected - supported actions (until now): - promote (cursor has to be on a text) - demote (cursor has to be on a text) - font attributes (cursor has to be on a text) - set due date (cursor has to be on a text) - collapse all - expand all
.