I make some analysis on the filebeforeopen event.
Is there a way to know if the file is openned with the -ro flag.notepad.
getCommandLine works only from a new session and editor.getReadOnly is not possible because the file is not openned yet.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thanks but that was not what I meant.
I open the file whith the -ro switch but the file itself is not read only.
I dont have win32file but I just verified, with os.stat, that the file is not temporarily set RO by notepad
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Oh, I see - no, I don't think that you can get these information within the filebeforeloaded callback,
but you could get it in the bufferactivated callback. I assume there is still enough time to call
notepad.close before you see the content of the file. As i tested it, there was a flickering but nothing
what was really annoying, at least for me.
Cheers
Claudia
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thanks it works.
I just have to detect that it is the first activation using a global just used between beforeopen and bufferactivated in attempt to avoid concurency
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I make some analysis on the filebeforeopen event.
Is there a way to know if the file is openned with the -ro flag.notepad.
getCommandLine works only from a new session and editor.getReadOnly is not possible because the file is not openned yet.
I think it is only possible when using external modules like win32file.
Cheers
Claudia
Thanks but that was not what I meant.
I open the file whith the -ro switch but the file itself is not read only.
I dont have win32file but I just verified, with os.stat, that the file is not temporarily set RO by notepad
Oh, I see - no, I don't think that you can get these information within the filebeforeloaded callback,
but you could get it in the bufferactivated callback. I assume there is still enough time to call
notepad.close before you see the content of the file. As i tested it, there was a flickering but nothing
what was really annoying, at least for me.
Cheers
Claudia
Thanks it works.
I just have to detect that it is the first activation using a global just used between beforeopen and bufferactivated in attempt to avoid concurency