ArminKH Well-Known Member Jul 2, 2015 #1 hi is there any way to change isinitialized to Private in a class module? for example we can make any sub unreachable by add Private before each sub name but i cant find any relevant solution for isinitialize thanx
hi is there any way to change isinitialized to Private in a class module? for example we can make any sub unreachable by add Private before each sub name but i cant find any relevant solution for isinitialize thanx
Cableguy Expert Licensed User Longtime User Jul 2, 2015 #2 All classes, including views, have an isinitialized sub, even when the sub is not present in the code. You can try to make initialize private or even try not to have an initialize sub, but I don't think it will eliminate the isinitialized sub. Upvote 0
All classes, including views, have an isinitialized sub, even when the sub is not present in the code. You can try to make initialize private or even try not to have an initialize sub, but I don't think it will eliminate the isinitialized sub.
ArminKH Well-Known Member Jul 2, 2015 #3 Cableguy said: All classes, including views, have an isinitialized sub, even when the sub is not present in the code. You can try to make initialize private or even try not to have an initialize sub, but I don't think it will eliminate the isinitialized sub. Click to expand... MY problem is about this thread https://www.b4x.com/android/forum/threads/create-a-child-sub-into-parent-sab.55777 i want 2 create a sub into a parent sub after minutes i find a solution : 1-Create a class module Named A 2-Create a class module Named B on class A we create this sub Code: Copy Sub Result as B End sub and on Class be Create 2 sub like This Code: Copy Sub Male log("male") end sub sub Female log("female") end sub now on main activity we can Code: Copy Dim R as A A.Result.Male but i dont want to show Class B and Also IsInitialized any solution? thank u Last edited: Jul 2, 2015 Upvote 0
Cableguy said: All classes, including views, have an isinitialized sub, even when the sub is not present in the code. You can try to make initialize private or even try not to have an initialize sub, but I don't think it will eliminate the isinitialized sub. Click to expand... MY problem is about this thread https://www.b4x.com/android/forum/threads/create-a-child-sub-into-parent-sab.55777 i want 2 create a sub into a parent sub after minutes i find a solution : 1-Create a class module Named A 2-Create a class module Named B on class A we create this sub Code: Copy Sub Result as B End sub and on Class be Create 2 sub like This Code: Copy Sub Male log("male") end sub sub Female log("female") end sub now on main activity we can Code: Copy Dim R as A A.Result.Male but i dont want to show Class B and Also IsInitialized any solution? thank u
Cableguy Expert Licensed User Longtime User Jul 2, 2015 #4 Try to use a code module instead of a class Upvote 0
ArminKH Well-Known Member Jul 2, 2015 #5 Cableguy said: Try to use a code module instead of a class Click to expand... and then how is possible to add a relation between Class A and Code module B From a sub on Class mudule? for example then we cant create a sub similar to this Code: Copy Sub Result as B End sub Upvote 0
Cableguy said: Try to use a code module instead of a class Click to expand... and then how is possible to add a relation between Class A and Code module B From a sub on Class mudule? for example then we cant create a sub similar to this Code: Copy Sub Result as B End sub
Cableguy Expert Licensed User Longtime User Jul 2, 2015 #6 That's a good question... Using the 2 classes solution try this Sub _ isinitialized End sub Upvote 0
sonicmayne Member Licensed User Longtime User Jul 2, 2015 #7 I'm sure you can just write: Code: Copy Private Sub IsInitialized As Boolean Return False End Sub in the class and it won't be visible outside the class. Upvote 0
I'm sure you can just write: Code: Copy Private Sub IsInitialized As Boolean Return False End Sub in the class and it won't be visible outside the class.
ArminKH Well-Known Member Jul 2, 2015 #8 Cableguy said: That's a good question... Using the 2 classes solution try this Sub _ isinitialized End sub Click to expand... i am not sure i understand i am begginer and my english is not good excuse me if is possible please explain more with details tnx Upvote 0
Cableguy said: That's a good question... Using the 2 classes solution try this Sub _ isinitialized End sub Click to expand... i am not sure i understand i am begginer and my english is not good excuse me if is possible please explain more with details tnx
sonicmayne Member Licensed User Longtime User Jul 2, 2015 #9 In Class module A and B you have made put the above code into both, and IsInitialized will disappear from the list of available methods. Upvote 0
In Class module A and B you have made put the above code into both, and IsInitialized will disappear from the list of available methods.
ArminKH Well-Known Member Jul 2, 2015 #10 sonicmayne said: I'm sure you can just write: Code: Copy Private Sub IsInitialized As Boolean Return False End Sub in the class and it won't be visible outside the class. Click to expand... yes this is correct but please try my codes on post 3 the isinitialize is still reachable from Code: Copy R.Result.Male Upvote 0
sonicmayne said: I'm sure you can just write: Code: Copy Private Sub IsInitialized As Boolean Return False End Sub in the class and it won't be visible outside the class. Click to expand... yes this is correct but please try my codes on post 3 the isinitialize is still reachable from Code: Copy R.Result.Male
Cableguy Expert Licensed User Longtime User Jul 2, 2015 #11 In some code languages the leading underscore renders the sub invisible, kind of like private does. So you could try it in your B class, just add the sub empty Upvote 0
In some code languages the leading underscore renders the sub invisible, kind of like private does. So you could try it in your B class, just add the sub empty
sonicmayne Member Licensed User Longtime User Jul 2, 2015 #12 Have you put the above code in both class A and B? Upvote 0
ArminKH Well-Known Member Jul 2, 2015 #13 sonicmayne said: Have you put the above code in both class A and B? Click to expand... OOPPPS NOOO NOW the IsInitialized not shown and now how is possible to Hide and set unreachable Class B from Main activity? Upvote 0
sonicmayne said: Have you put the above code in both class A and B? Click to expand... OOPPPS NOOO NOW the IsInitialized not shown and now how is possible to Hide and set unreachable Class B from Main activity?
sonicmayne Member Licensed User Longtime User Jul 2, 2015 #14 Do you mean so you can't do something like: Code: Copy Dim B As B in Main? If so, i'm not entirely sure. Upvote 0
Do you mean so you can't do something like: Code: Copy Dim B As B in Main? If so, i'm not entirely sure.
ArminKH Well-Known Member Jul 2, 2015 #15 yes well,so my solution failed i want just create subs into one sub as i said on this thread https://www.b4x.com/android/forum/threads/create-a-child-sub-into-parent-sab.55777/#post-351058 maybe i'am on wrong way thank u both Upvote 0
yes well,so my solution failed i want just create subs into one sub as i said on this thread https://www.b4x.com/android/forum/threads/create-a-child-sub-into-parent-sab.55777/#post-351058 maybe i'am on wrong way thank u both