So at last there are two files that in fact holds allfunction definitions.
First YOUR_LIB.rb that holds all function definitions.
All functions are defined in a separate class (YOUR) to avoid crashes with another people's plugins.
YOUR_PLUGIN.rb holds definition of your plugin, what happens when it is initialised, what happens when You move cursor, etc.
In fact You could define all the functions You need in not in YOUR_LIB file but in a YOUR_PLUGIN , but if Tou want to use a function in another plugin, You just have to call it from library of functions , and not copy it in a plugin file.
No comments:
Post a Comment