On Sunday, September 22, 2019 at 7:26:20 PM UTC+2, SegundoBob wrote: > > > > On Sunday, September 22, 2019 at 2:12:03 AM UTC-7, Edward K. Ream wrote: >> >> On Friday, September 20, 2019 at 5:33:31 AM UTC-5, Edward K. Ream wrote: >> >> Sounds like a worthy bug. Thanks for sharing it with us. >>> >> >> A few more thoughts. >> >> > I spent yesterday trying to put together a small test program and bug > report concerning this bug. I regret to say that the "Phantom NewHeadline" > symptom appears to be the wrong symptom to investigate. It appears that > LeoBridge has very serious problems creating and/or changing a Leo-Editor > file. Almost everything I tried failed in some way every time. I was > seriously hampered by your decision not to fix issue #658 > <https://github.com/leo-editor/leo-editor/issues/658>, which prevented me > from writing simple tests. Not being able to close a LeoBridge commander > is a very inconvenient restriction. It would also help if there was a > LeoBridge.close() method. >
To avoid triggering #658, manually reopen g.app.db object after closing the first commander. Perhaps leoBridge.openLeoFile method could be modified to check if g.app.db is closed and if so, reopen it automatically. # add an import statement import leo.core.leoCache as leoCache # and then after closing first commander cmdr1.close() # insert the following two lines bridge.g.app.global_cacher = leoCache.GlobalCacher() bridge.g.app.db = bridge.g.app.global_cacher.db # now you can open another file cmdr2 = bridge.openLeoFile(...) # Vitalije -- You received this message because you are subscribed to the Google Groups "leo-editor" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/leo-editor/b0d1927b-b30f-4c7b-8c20-89754ded3fbb%40googlegroups.com.
