LucaMs Expert Licensed User Longtime User Apr 2, 2014 #1 (I might even force myself a little, I know ) I have developed a class, I will publish, but it goes used as a Singleton class, in the sense that there must be only one instance of it. I should better study the module Scales by Klaus, although it needs initialization, it is a module! Or should I create a library? (Finally, I have not tested it in depth and probably the descriptions in English that I have used are are far from perfect). Thanks
(I might even force myself a little, I know ) I have developed a class, I will publish, but it goes used as a Singleton class, in the sense that there must be only one instance of it. I should better study the module Scales by Klaus, although it needs initialization, it is a module! Or should I create a library? (Finally, I have not tested it in depth and probably the descriptions in English that I have used are are far from perfect). Thanks
Erel B4X founder Staff member Licensed User Longtime User Apr 2, 2014 #2 Compiling the class into a library will not change its behavior. You have two options: 1. Explain to the developer who uses this class that they should only create one instance of it. 2. Convert it to a code module which is by definition a singleton. Upvote 0
Compiling the class into a library will not change its behavior. You have two options: 1. Explain to the developer who uses this class that they should only create one instance of it. 2. Convert it to a code module which is by definition a singleton.
LucaMs Expert Licensed User Longtime User Apr 2, 2014 #3 Thanks. The first option is the one I used. If I convert it to module, I'm afraid of having to check in every function if it has been initialized. Ok, I publish it as it is, it may be helpful. I gladly will accept any criticism and advice. Upvote 0
Thanks. The first option is the one I used. If I convert it to module, I'm afraid of having to check in every function if it has been initialized. Ok, I publish it as it is, it may be helpful. I gladly will accept any criticism and advice.