Using Objects
T Chap
Posts: 4,223
I am curious if there is a solution to this. The idea I would like to use is to have the main program as one spin file, but all the other methods as objects with their own file names. This way, there is only one main method with a constantly updated revision number, but the other methods just keep getting updated/fixed/improved and re-saved with the same name, just update any one particular method and re-save it, and from then on ALL older and future versions will refer to the same (but newly saved) method, and the newer improved methods don't have to be manually copied back into all the earlier versions when they need to be tweaked. As it is, to update a client, I have to copy and paste numerous methods back into the body of the main program.
There are obvious problems with this idea, since you cannot list a file as a obj and call the method without using pointers to transfer info back and forth, in which case there would be a big hassle trying to manage the pointers and add the required pointers to each method.
Is there a way to call the remote outside the main program, so that it is behaving identically to how it did when it lived inside the main program, but without having to make any changes to it?
There are obvious problems with this idea, since you cannot list a file as a obj and call the method without using pointers to transfer info back and forth, in which case there would be a big hassle trying to manage the pointers and add the required pointers to each method.
Is there a way to call the remote outside the main program, so that it is behaving identically to how it did when it lived inside the main program, but without having to make any changes to it?
Comments
Objects are deliberately constrained with limited access to their internals. You can reference named constants from outside the object and you can reference PUBlic methods, that's all. You can't reference the object's variables (except indirectly via pointers) and you can't reference PRIvate methods. You also can't access objects more than one level deep.