Reusable function for install/unintall
Hello folks,
I have a function that i would like to call within my "onInit" and "un.onInit" callbacks. Unfortunately i can only call this function from one or the other callback.
If i prefix it with "un." then i can only call it from the uninstall callback. Without the prefix, i can only call it from the install callback.
The only way i can think to have this code run in both call backs is to have two seperate copies of the entire function (ie. one for install and one for uninstall).
But it just doesn't make sense to me that i can't have reusable code between the install/uninstall sections.
Am i missing something? or will i have to make 2 seperate functions with the exact same code?
Thanks for the help. :)
-DaViS