tchart Well-Known Member Licensed User Longtime User Jan 17, 2013 #1 Loving 2.5 and the compile to class. One of my code modules has a custom type defined. For example; Type Point (X As Double, Y As Double) Now when I compile this as a library this type is exposed (even though my Process_Globals is "private"). Is there a way to hide this Type from the being exposed by the library in the B4A IDE? The example above is pretty simple but another custom type I have in the library has 10+ primitives. The type is only used internally by my code so the user doesn't need to see it.
Loving 2.5 and the compile to class. One of my code modules has a custom type defined. For example; Type Point (X As Double, Y As Double) Now when I compile this as a library this type is exposed (even though my Process_Globals is "private"). Is there a way to hide this Type from the being exposed by the library in the B4A IDE? The example above is pretty simple but another custom type I have in the library has 10+ primitives. The type is only used internally by my code so the user doesn't need to see it.
Erel B4X founder Staff member Licensed User Longtime User Jan 17, 2013 #2 Only be editing the generated XML file and removing this type. Upvote 0
J Joe_L Member Licensed User Longtime User Apr 15, 2013 #3 The implication of the discussion above is that types are always public. So if you want to use a type from a different module does it matter which section it is declared in? I discovered that a type statement fails to compile when marked as public. So do the keywords public/private not apply to types? Code: Copy Public Type MYTYPE1 (a As Int, b As Int) '!!this fails to compile Type MYTYPE2 (a As Int,b As Int) (Incidentally the compiler error message is not helpful so it takes a bit of fiddling to work out what's wrong with the statement.) Upvote 0
The implication of the discussion above is that types are always public. So if you want to use a type from a different module does it matter which section it is declared in? I discovered that a type statement fails to compile when marked as public. So do the keywords public/private not apply to types? Code: Copy Public Type MYTYPE1 (a As Int, b As Int) '!!this fails to compile Type MYTYPE2 (a As Int,b As Int) (Incidentally the compiler error message is not helpful so it takes a bit of fiddling to work out what's wrong with the statement.)
Erel B4X founder Staff member Licensed User Longtime User Apr 15, 2013 #4 Types are always public. It doesn't matter where they are declared. Upvote 0