K kps Member Jul 27, 2020 #1 Hello all, I came across this Log To Text File Class in this thread. https://www.b4x.com/android/forum/threads/log-to-txt-file-class.76388/ I found it quite useful. I wanted to introduce two additional methods to read the log file and to delete the log file. Both the methods require the log file name which is internal to the Class. (Actually, we specify the name of the log file, but internally, the name is appended with the current date. So, possibly, I can workaround that limitation of not having the internal file name). How do I write a new class module which adds only the two additional methods, keeping the original class unmodified ? I found this thread after searching the forum. https://www.b4x.com/android/forum/threads/how-i-will-extend-a-b4j-or-b4a-class.48055/#content which says, Erel said: It is not possible to extend a class as there is no support for inheritance. Click to expand... That was way back in 2014. Is it not possible even in the current version? Regards, KPS
Hello all, I came across this Log To Text File Class in this thread. https://www.b4x.com/android/forum/threads/log-to-txt-file-class.76388/ I found it quite useful. I wanted to introduce two additional methods to read the log file and to delete the log file. Both the methods require the log file name which is internal to the Class. (Actually, we specify the name of the log file, but internally, the name is appended with the current date. So, possibly, I can workaround that limitation of not having the internal file name). How do I write a new class module which adds only the two additional methods, keeping the original class unmodified ? I found this thread after searching the forum. https://www.b4x.com/android/forum/threads/how-i-will-extend-a-b4j-or-b4a-class.48055/#content which says, Erel said: It is not possible to extend a class as there is no support for inheritance. Click to expand... That was way back in 2014. Is it not possible even in the current version? Regards, KPS
Erel B4X founder Staff member Licensed User Longtime User Jul 28, 2020 #2 There is no inheritance feature in B4X. Inheritance will also won't help in such case as it is only useful in cases where the base class is built specifically to be extended like this. There are other ways to extend classes but only if they are designed to be extended. Upvote 0
There is no inheritance feature in B4X. Inheritance will also won't help in such case as it is only useful in cases where the base class is built specifically to be extended like this. There are other ways to extend classes but only if they are designed to be extended.
K kps Member Jul 28, 2020 #3 Thank you. So, I just have to make whatever modifications I want in the original class itself and name it differently. Regards, KPS Upvote 0
Thank you. So, I just have to make whatever modifications I want in the original class itself and name it differently. Regards, KPS