Outliner with drag/drop reordering - part 2
@ccc thanks for the advice
@ihf Is the error still
Could Not “Run Code” This action encountered an error while running on your iPhone
@cvp Yes, that is the message.
@ihf weird, this message should occur if
IPhone/Settings/Shortcuts/Advanced/Allow Running ScriptsSwitch is not ON...
I guess that your new iPhone has access to iCloud Drive and that the shortcut is downloaded on your iPhone,not with the cloud symbol.
I also guess that you allowed shortcuts folder to be accessible by Pyto
@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.