Outliner with drag/drop reordering - part 2
@ccc thanks for the advice
@cvp Wouldn't not work on the iPhone (which it does) if permissions were incorrect?
@ihf I suppose you are right. So I don't understand why it does not work on your watch. I guess there is still a configuration setting missing, but which one... Could you compare Pyto settings on your boTh iPhones?
Does the shortcut ask you the text to append?
I just restested on my watch, still ok.
@cvp Yes, the Shortcut asks me for text and then for permission ("Allow "AddRowToFixedOutline"to access "Pyto". After I touch "Allow" I get the message "Could Not Run Code -This action encountered an error while running on your iPhone". I only have the iPhone 13 Pro.
@ihf I think that I remember that after I had set the
IPhone/Settings/Shortcuts/Advanced/Allow Running ScriptsSwitch ON, I have had to power off/on the iPhone. Perhaps you could try.
@cvp Power cycling the phone did have an effect...no more error message. After getting input and asking for permission, the Shortcut hangs with the progress circle. Progress?
@ihf Is the outline file that you want to append already downloaded on your iPhone?
Is the outline folder accessible to Pyto on the iPhone?
Power cycling the phone did have an effect...no more error message
Don't believe I'm a Pyto specialist but when I meet a problem, Power off/on is always my last try to solve it.
@cvp the file name had changed and Pyto was getting a file not found error. I changed he file name in the shortcut and now it works on the iPhone but fails again with the same message as beore when run from the watch.
@ihf Weird and, sincerely, it seems too complex for me.
Anyway, problem of file name would arrive, that's sure. I know this problem and I have already thought about a way to avoid it. The outline.py script could store in the 2022 event of file its full name and the shortcut could ask to choose an outline file like in the viewer shortcut, by listing all files found as 2022 events.
But, a thing that the shortcut nor the Pyto code couldn't do (I think) is, when you modify a file, save it as a new date-time name and modify the .prm with the new file name. That seems too much for a shortcut.
Is it really important for you to be able to append a text to any outline on your watch?
I don't understand how Apple still allows applications to be sold that haven't received updates for a very long time. Good for developers, but buyers take the risk of not profiting from their purchase for long. For me, Pythonista is the best app I have used, which is worth a lot more than its price and for which I would gladly agree to pay an annual subscription of 10 €, even without any updates, just so as not to see it one day disappear or no longer be functional. To be prepared if this disaster ever happens, I imagined converting outline.py to Pyto, but it would be long and not that easy. Indeed, any development in Pythonista also uses modules, like dialogs, which are not available in Pyto and which should therefore be rewritten. To give it a try, I converted SetTextFieldPad.py which is only 134 lines long and already there I encountered differences between the methods of the two UIs and the way to use ObjectiveC, differences that require spending time in searches and tests. If you are interested, try this little script in Pyto
You can even test this very little outline.py that only shows the buttons of the main screen, with these small functionalities:
- files menu, only to test a TableView and a shield
- open to test the Pyto file picker
- font size to test the SetTextFieldPad converted module
- Pyto color picker
- Pyto font picker
Thé script has only 300 lines, thus you can be sure it does nothing. It was only to have an idea of how complex a conversion would be. And I could only be motivated to do this heavy conversion if Pythonista was planned to disappear, and, of course, if you still use this script.
Anyway, I wish you a pretty year 2022 with full Pyt(h)o(nista) projects.
@cvp The ability to add to an outline from the watch is definitely not terribly important. Like you (and I am sure many others), I am concerned that Pythonista will stop working after some new iOS release. I wish that @omz would reappear or somehow agree to put Pythonista into open source. I doubt that either will happen. That means that, at least at the moment, Pyto is the best alternative for Python development. However, it would clearly take a great deal of effort for the Pyto developers to bring it to Pythonista’s level of maturity. Pyto does however have many advantages that are not relevant to outline of (e.g., scipy, pandas, etc.).
As far as my use of outline goes, I use it all the time and I can’t thank you enough for all the work you have put into it.
I wish you and your family a VERY HAPPY AND HEALTHY (including covid-free) 2022!
@ihf I want more and more to convert outline.py to Pyto (funny challenge) but I am torn between converting the current version (ui.TableView) or the ui.ScrollView version which is still in test (with a huge lack of motivation, I do it regret)
A little question: you always say that you use the program each day, but do you still have a lot of unexplained crashes with the ui.TableView (yours) version?
@cvp I still get crashes, I just stopped reporting them.
@ihf I had naively hoped that they could disappear with an iOS upgrade or a Pythonista upgrade, so hoped by a lot of people. So next week, I'll be brave and restart the tests of the ScrollView version.
@cvp I'm not sure what Apple did to iOS Shortcuts, but the Shortcut I have been using to view my outlines on the Watch no longer works from the Watch (though it works fine on the iPhone). Instead of showing the outlines found in the calendar and letting you select one, it shows a blank screen.
@ihf you're right. It still works on iPad but no more on Watch...
Pyto also does not work anymore on the watch, don't ask me why.
@ihf If you really need it, I could modify outline.py to store each saved outline in a contact in addition (or in place) of an event. I have tested that a shortcut running on the Apple Watch can access to the contacts even if it can't (temporarily ?) access to calendars
@cvp Using contacts would be a good workaround for the glitch with the calendar. The only problem I see is that some apps like to get access to contacts (I try never to permit it) and so outline info would be exposed. I hope Apple will fix what they broke.
@ihf After some hours to try and test some Shortcuts actions, I've found that even if the "search events" action does not work anymore (with last version of IOS and Apple Watch OS), it seems that "get a number of events from a particular calendar" works correctly....
Then, I advice you to save the current Outlines shortcut under another name (I called it "Outlines old") before installation of a new shortcut. I also advice you to check their content to understand how they are different. Also, the "get events" action needs to know the maximum number of events (here 100, up to you to change the value) to get n events at a specified date (here 01/01/2022) in a specified calendar (here "outline").
And, please, test it and give some feedback, thanks.
New Outline shortcuts is here https://www.icloud.com/shortcuts/302a6602e9474cb7b34860a8acfd6dcc
@cvp It works well. 👏
@ihf Perhaps you also follow Pyto Discord and you have seen that I've been able (by scrupulously reading the documentation 😇) to do an Apple Watch complication working.
Thus, if you imagine a complication on your watch warning you of some info about your outlines, let me know but don't forget that Pyto code of complications would be very limited in ram and in functionalities.