From: Bernard D. <bde...@us...> - 2018-10-17 07:15:35
|
I have introduced the suggested fix (workaround). Changes committed to the repository ([rev. 1548](https://sourceforge.net/p/alphacocoa/code/1548/)). --- ** [tickets:#186] Scary bringToFront bug in connection with TeX error browsing** **Status:** open **Created:** Sun Oct 14, 2018 11:18 AM UTC by Joachim Kock **Last Updated:** Tue Oct 16, 2018 09:01 AM UTC **Owner:** nobody Scary bringToFront bug in connection with TeX error browsing I see sometimes that after a tex run, when I press Ctrl-W to browse errors, the effect is that the list of error lines is inserted into the tex source window instead of the TeX Console window! (Quite scary: unless you are quick and do Undo, you risk losing the content of your tex file!) There has been no change to the corresponding code in tetexComm for nearly 10 years, and the symptoms are also more like a core problem. The relevant proc is [TeX::tetexComm::displayErrorsAndWarnings]. In there I then inserted a debugging alertnote as follows: bringToFront $texConsole alertnote [win::Current] text delete [minPos] [maxPos] between the potential window change and the damaging text operation. What happens then is that the alertnote reports the full path of the tex source window, but after clicking OK, the warning list is actually inserted into the TeX Console. Surely some asynchronous stuff is taking place, confirmed by the following experiment: bringToFront $texConsole set ::A [win::Current] text delete [minPos] [maxPos] In this case, the damaging text is inserted into the tex source window, which is also the value of ::A. The difference between the two scenarios suggests that [bringToFront] has some delay, and that the alertnote takes enough time for the current window to become up to date. In fact, here is something funny: bringToFront $texConsole alertnote [win::Current] alertnote [win::Current] text delete [minPos] [maxPos] will give two alerts, the first reporting the path of the tex source file and the second reporting "*TeX Console*". To add to the mystery, the TeX Console is obviously frontmost at the time Ctrl-W is invoked, so I don't see how the tex source window could be involved at all. --- Sent from sourceforge.net because alp...@li... is subscribed to https://sourceforge.net/p/alphacocoa/tickets/ To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/alphacocoa/admin/tickets/options. Or, if this is a mailing list, you can unsubscribe from the mailing list. |