Closed Krzysztof-Cieslak closed 9 years ago
Thanks for the PR! I'm totally down for adding the ability for being notified when we create a file.
I looked up some stuff on how Atom uses event emitters, and I don't think atom.emitter
is meant to be used by packages because it's not documented as a public member. Also, the blog post about the API and the docs both recommend using an emitter internally and exposing a method like onDidCreateFile
for people to use.
I think what we should do is add an emitter as a static property on the AdvancedFileView
class and adding an onDidCreateFile
static method for subscribing to the event. Then just use that emitter instead of atom.emitter
. What do you think?
Sounds good to me :) If You can, please, implement it yourself. I'm by no means a coffescritp expert and bit busy with some other stuff at the moment. Would appreciate it :)
But having this notification will be useful for one of the plugins I develop :)
Originally proposed in https://github.com/Trudko/advanced-new-file/pull/43