I almost deleted the script by swiping to the left on it, from the left side panel. Is the a way to close out the open script?
I don’t see an x button or anything.
Thank you!
I almost deleted the script by swiping to the left on it, from the left side panel. Is the a way to close out the open script?
I don’t see an x button or anything.
Thank you!
Are you on iPhone or iPad?
It is sure that if you have only one edited script, there is no x button, thus no way to close it.
You have to open another file. At least on iPad.
@cvp, same on iPhone.
I just figured out an alternative. Click on the [+] icon (top right) which opens a new tab, then close the file tab.
possibly can setup an editor action to habdle creating z virtual temp file so you can clase all tabs then by removing thr temp file the app should default to the menu. ill look around and see if i can whip something up
@stephen you could define this little script as a Pythonista tool, it will close all tabs
from objc_util import *
@on_main_thread
def main():
win = UIApplication.sharedApplication().keyWindow()
root_vc = win.rootViewController()
if root_vc.isKindOfClass_(ObjCClass('PASlidingContainerViewController')):
tabs_vc = root_vc.detailViewController()
for tab in tabs_vc.tabViewControllers():
if tab.isKindOfClass_(ObjCClass('PA2UniversalTextEditorViewController')):
tabs_vc.closeTab_(tab)
if __name__ == '__main__':
main()
i am just about to get into objc_utils so i dont think of there yet for solutions lol i was going to try and get a script to buffer copies of open tabbed files then close originals. then compare to make sure they closed without corruption or anything, and so on.. i really need to jump into objc_utils lol
Appologies for so many typos...
here you go @tactfulgamer from cvp ↴
@cvp said:
@stephen you could define this little script as a Pythonista tool, it will close all tabs
```python
from objc_util import *@on_main_thread
def main():
win = UIApplication.sharedApplication().keyWindow()
root_vc = win.rootViewController()
if root_vc.isKindOfClass_(ObjCClass('PASlidingContainerViewController')):
tabs_vc = root_vc.detailViewController()
for tab in tabs_vc.tabViewControllers():
if tab.isKindOfClass_(ObjCClass('PA2UniversalTextEditorViewController')):
tabs_vc.closeTab_(tab)if name == 'main':
main()
```
@stephen I had already written that here but, at this moment, to close the edited tab did crash, and now, it doesn't