KMatle Expert Licensed User Longtime User Apr 17, 2016 #1 I've created 2 lib's so far but I'm unsure which is the best way/how to do it "better". a) I didn't see any need to use an initialize method for the caller. So is it more a style or re-use thing? b) Returning a single value is like returning it from a sub. In one of the methods I return a map. Are there "better" or other more "standard" ways?
I've created 2 lib's so far but I'm unsure which is the best way/how to do it "better". a) I didn't see any need to use an initialize method for the caller. So is it more a style or re-use thing? b) Returning a single value is like returning it from a sub. In one of the methods I return a map. Are there "better" or other more "standard" ways?
Erel B4X founder Staff member Licensed User Longtime User Apr 18, 2016 #2 a) There can be all kinds of usages for an Initialize method. The most typical one is when the exposed type is a wrapper. The wrapped object constructor is then called in the Initialize method. b) A map is a possible solution. Another option is to return a class that holds the different values. Upvote 0
a) There can be all kinds of usages for an Initialize method. The most typical one is when the exposed type is a wrapper. The wrapped object constructor is then called in the Initialize method. b) A map is a possible solution. Another option is to return a class that holds the different values.