BarryW Active Member Licensed User Longtime User Aug 18, 2016 #1 Hi. How to create an extended function in b4X. Like StringBuilder Lib that has .Append("").Append(""). I want to create a class in b4j with this and compile it to as library. Tnx.
Hi. How to create an extended function in b4X. Like StringBuilder Lib that has .Append("").Append(""). I want to create a class in b4j with this and compile it to as library. Tnx.
Erel B4X founder Staff member Licensed User Longtime User Aug 18, 2016 #2 Code: Copy Sub Append(s As String) As YourClass Log(s) Return Me End Sub Replace YourClass with the name of the class. Upvote 0
Code: Copy Sub Append(s As String) As YourClass Log(s) Return Me End Sub Replace YourClass with the name of the class.
BarryW Active Member Licensed User Longtime User Aug 18, 2016 #3 Tnx. In my class i have Code: Copy sub sql1 as string return 1 end sub sub sql2 as string return 2 end sub sub sql3 as string return 3 end sub sub string1 as string return "string1" end sub sub string2 as string return "string2" end sub sub string3 as string return "string3" end sub i want to seperate this like when i type sql. only sql function will appear and str. on string function will appear. How to do that? Upvote 0
Tnx. In my class i have Code: Copy sub sql1 as string return 1 end sub sub sql2 as string return 2 end sub sub sql3 as string return 3 end sub sub string1 as string return "string1" end sub sub string2 as string return "string2" end sub sub string3 as string return "string3" end sub i want to seperate this like when i type sql. only sql function will appear and str. on string function will appear. How to do that?
Erel B4X founder Staff member Licensed User Longtime User Aug 18, 2016 #4 You should start a new thread for a new question. It will happen automatically. The list will jump to the first matched item. Upvote 0
You should start a new thread for a new question. It will happen automatically. The list will jump to the first matched item.
BarryW Active Member Licensed User Longtime User Aug 18, 2016 #5 I think its related to my first question. Is there any declaration of private class? Upvote 0
Erel B4X founder Staff member Licensed User Longtime User Aug 18, 2016 #6 Each thread should be about a single question. Please start new threads for new questions. Upvote 0