#1008 Lua OnClose problem

Bug
closed-duplicate
SciTE (626)
1
2016-03-16
2010-08-11
Anonymous
No

Sorry to be a pest, but I suspect that you might have marked the wrong bug fixed...

I submitted two bugs one about folding levels which had it's Resolution set as none, but seems to have been fixed in 2.20, and one about OnClose not being called on open buffers if SciTE is closed down which is marked as Fixed but is still not working in version 2.20

The attached test.lua file contains an OnClose function that if test.lua is set as the startup script, should create a file called close.txt in your home directory (you will have to change /home/william/close.txt to where you want to create the file signifying that OnClose was called) when OnClose is called.

If you close a buffer with Ctrl+W or Close on the File Menu then close.txt is created - OnClose was called. If you somply shut down SciTE (by Alt+F4, or clicking on the close icon in the top corner of the window - left or right depending on your OS and desktop) then close.txt is not created indicating that OnClose was not called for any of the buffers open in SciTE when it was closed.

I assume that this is a bug that SciTE doesn't call OnClose under this circumstance - otherwise how can you tell if a buffer is being closed if some closeing events are not captured?

William Fraser
william.fraser@virgin.net

Discussion

  • Nobody/Anonymous

    Code to demonstrate OnClose problem

     
  • Neil Hodgson

    Neil Hodgson - 2010-08-11

    #3033857 is Open/Fixed with the fix committed on 31/July. 2.20 was released on 30/July so it does not contain this fix.

    I was unable to reproduce #3034774 so did not mark it as fixed. You should do so if it now works.

     
  • Neil Hodgson

    Neil Hodgson - 2010-08-11
    • assigned_to: nobody --> nyamatongwe
    • priority: 5 --> 1
    • status: open --> open-duplicate
     
  • Neil Hodgson

    Neil Hodgson - 2016-03-16
    • status: open-duplicate --> closed-duplicate
    • Group: --> Bug
     
  • Neil Hodgson

    Neil Hodgson - 2016-03-16

    OnClose appears now to be called for Alt+F4 or close icon so closing bug.

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks