05-11-2017 01:59 PM
Hello,
I have an OO question. I want to have a common reuse class. I have this reuse class in multiple projects. Lets say I add a method to the Reuse class. How do I get the new method into the projects that use the reuse class? Do I have to manually add the method to my class in every project that uses the reuse class? Is there way of automatically loading classes from file that may have methods added to them?
Thanks
05-11-2017 02:43 PM
If you keep this class in one shared location, and just map your project to it, then of course, new method will be added to other projects. Because you will refer from your projects to original, shared location with the class - so you can access its actual methods, etc. without issues.
But if you copy copies of this class "physically", and put them to folder with your projects, then of course, there's no chance, that new added methods will be added to your projects.
As soon as you create copy of the class, plugin, etc. and physically move it somewhere - it'll not be updated automatically when you'll modify original "copy" of class, plugin, etc.
Sincerely, kosist90
05-11-2017 02:59 PM
05-11-2017 04:59 PM
05-11-2017 08:39 PM
If you want to use this on multiple computers (for example with source control) and you don't store the reuse class inside each source-controlled directory, you should be careful with paths - it's pretty likely that the paths won't be the same on all of your computers (unless they're clones).
VIPM and distributing packages can help you with this, but then you have to rebuild the package each time you change it, which can be annoying (but then they're still automatically loaded when needed).