Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Windowing behavior in v16.0

    When attempting to close all tabs with multiple tabs open in the Do-File Editor, v16.0 (running on a Mac) appears to require the closing of each tab one by one. In v15.1, the user instead received a popup warning:
    Code:
    Are you sure you want to close this window?
    
    23 documents are open in this window. Do you want to close the window anyway?
    Clicking "Close Window" in v15.1 closed all tabs at once.

    For someone (like me) who most typically uses the Do-File editor as a "scratchpad" in developing programs, this v16.0 behavior is unwelcome.

    I've tried different combinations of the Tabs options, but to no avail. It's also possible that I'm missing an option that would override this behavior, and if so would appreciate being pointed in the right direction.

    If there's no way around this I'll post the issue on the v17 (or v16.1) Wishlist. Thanks in advance.

  • #2
    As a Mac user yet to upgrade, I can't help but I can offer moral support. If you don't find a way around this, I would argue that this represents a bug. It is not the way Safari works - closing a tabbed window closes all the tabs at once, with no dialog but with an easy way of reopening the last closed window. It is not the way my do-file editor of choice - BBedit - works, in that with multiple documents open, closing the window brings up a dialog box. In Stata 15, from the File menu, Close Tab (command-W) closed a single tab, and Close (command-shift-W) closed the tabbed window, with the warning you describe. Do those menu items function differently now? (I'm assuming "Clicking 'Close Window'" meant clicking on the red dot in the left end of the window's toolbar.)

    If you don't get any solution to this from Statalist members, I suggest you report it as a bug to Stata Technical Services.

    Comment


    • #3
      Thanks William. I see the same behavior using File Menu/Close Window so I will, as you suggest, send this to Technical Services. I'll post to this thread any information I receive.

      Comment


      • #4
        Originally posted by John Mullahy View Post
        When attempting to close all tabs with multiple tabs open in the Do-File Editor, v16.0 (running on a Mac) appears to require the closing of each tab one by one.
        I believe you're referring to Do-file Editors with unsaved documents. Any Do-file Editor that has no unsaved changes will close without being prompted. Any Do-file Editor with unsaved changes will display a prompt and unfortunately, that's a limitation of macOS.

        In versions of Stata prior to Stata 16, Stata used a third party tool to support tabbed windows as native macOS tabbed window support wasn't added until macOS 10.12. The third party tool had a lot of flexibility but one thing that was difficult to do was to tab different window types like tabbing the Do-file Editor with a Viewer. With the majority of Mac users using laptops where screen real estate is limited, we felt the ability to tab most all of Stata's windows together would be a nice feature for our laptop users. In addition, third party tools can break or go unsupported in future macOS updates. An example of this is the third party path control that earlier versions of Stata used to display at the bottom of the main Stata window that required functionality that was deprecated by Apple (that's why the path is now displayed as just text).

        But with native tab support we did lose some flexibility. macOS native tabs are actually treated internally as separate windows with only one window displayed at a time. When you click the close button on a window that contains multiple tabs, macOS actually tells each "tabbed" window to close individually and will prompt for each tab that has unsaved changes. You can see an example of this in the TextEdit application.

        Originally posted by William Lisowski View Post
        I would argue that this represents a bug. It is not the way Safari works - closing a tabbed window closes all the tabs at once, with no dialog but with an easy way of reopening the last closed window. It is not the way my do-file editor of choice - BBedit - works, in that with multiple documents open, closing the window brings up a dialog box.
        BBEdit does not use native tabs and does not do tabbed windows in the traditional sense since it displays a list of open documents in a single window. It has only one window type to contend with and pretty much everything happens in one window. Stata is unique in that it has multiple disparate window types. Safari does not have to worry about unsaved content so it simply closes all the "tabbed" windows.

        However, we will investigate further to see if any improvements can be made.
        -Chinh Nguyen

        Comment


        • #5
          Hello Chinh: Thanks for your message. Yes, I was referring to the case with unsaved documents. (This is how I typically use the do-file editor as a scratchpad, as I noted in #1, rarely saving anything directly from the editor.) Thanks for any possible improvements that might be considered — as I noted, the v15.1 behavior was preferable (at least for me).
          Thanks, John

          Comment


          • #6
            To add one more piece of information: If as in #1 I have unsaved documents open in multiple do-file editor tabs and I enter
            Code:
            exit, clear
            I then get the popup
            Code:
            You have 3 Stata/SE 16.0 documents with unsaved changes. Do you want to review these changes before quitting?
            If you don’t review your documents, all your changes will be lost.
            If at that point I click Discard Changes then that session of Stata 16.0 terminates without my needing to close each tab separately.

            The macOS technical issues underlying Chinh Nguyen (StataCorp)'s reply in #4 are well beyond my comprehension, but I thought I would add this information to the thread for the record.

            Comment


            • #7
              Originally posted by John Mullahy View Post
              To add one more piece of information: If as in #1 I have unsaved documents open in multiple do-file editor tabs and I enter
              Code:
              exit, clear
              I then get the popup
              Code:
              You have 3 Stata/SE 16.0 documents with unsaved changes. Do you want to review these changes before quitting?
              If you don’t review your documents, all your changes will be lost.
              If at that point I click Discard Changes then that session of Stata 16.0 terminates without my needing to close each tab separately.
              When you quit Stata, Stata is proactive and is the one closing those windows and and is able to display its own prompt. When you click on the close button of a window, it is macOS, not Stata, that is closing all the windows/tabbed windows and displaying the prompt for each tabbed window.
              -Chinh Nguyen

              Comment


              • #8
                Thanks Chinh.

                Comment


                • #9
                  As always, thanks to Chinh Nguyen (StataCorp) or his insight of what's going on behind the scenes.

                  A workaround might be to add a "close all tabs" button to the set of optional buttons that can be added to the Do-file Editor toolbar. When clicked, it would mimic the behavior Stata exhibits when you quit Stata.

                  A solution from Apple would be for therm to include on the "unsaved changes" dialog box a button to apply your response to all remaining tabs. Similar to the button you see when you're dragging a bunch of files into a new folder that has files by those names.

                  Comment


                  • #10
                    Just to contribute to the discussion of the windows behavior of Stata 16.0 do-file editor in mac, instead of opening another topic. I guess both would require simple fixes:

                    1- It would be useful to have some kind of indication for the modified but unsaved do files. A simple star in front of the file name on the tab, maybe. When Stata warns me about unsaved changes in the editor, I have no clue about which file that I have not saved.

                    2- This one is not about the window behavior though. I am very happy with the utf-8 support. Stata 16 is improved over version 15 in handling Turkish characters. But do-file editor in mac version of Stata 16 has still a problem with "ı" (dotless i) letter. It is very common letter in Turkish, and the editor does not print is appropriately. When I press "ı", the cursor just moves to the end of the line with no printing the character. This must be very annoying for Turkish users. Other text editors do not have such problem.

                    Comment

                    Working...
                    X