Android Question TextEditor in B4A

Sergey_New

Well-Known Member
Licensed User
Longtime User
B4XPages is B4A
I don't need B4i and B4J.
Removed all #if Java and #if B4i., except
Main:
#if Java
public boolean _onCreateOptionsMenu(android.view.Menu menu) {
processBA.raiseEvent(null, "create_menu", menu);
return true;

}
#EndIf
If I delete it, the menu is not created.
What should I do?
 

Attachments

  • TextEditorB4A.zip
    6.9 KB · Views: 87
Upvote 0

aeric

Expert
Licensed User
Longtime User
I don't need B4i and B4J.
Removed all #if Java and #if B4i., except
Main:
#if Java
public boolean _onCreateOptionsMenu(android.view.Menu menu) {
processBA.raiseEvent(null, "create_menu", menu);
return true;

}
#EndIf
If I delete it, the menu is not created.
What should I do?
#If Java is required. Don't remove it.
 
Upvote 0

Sergey_New

Well-Known Member
Licensed User
Longtime User
You need that line probably for top menu bar.
Okay, I won't delete it.
If it is not difficult, could you help so as not to use the Main and B4XMainPage modules and replace them with the Main B4A module?
 
Upvote 0

BlueVision

Active Member
Licensed User
Longtime User
Confusing, I don't understand the reason for doing it....
I see no real reason to remove the corresponding parts from the programme code. Perhaps you feel the same way as I did at the beginning and have more of an understanding problem with the term B4X. Please understand me correctly, I don't want to lecture you. I just have the feeling that you may not have understood the principle of B4X. Disassociate yourself from the idea that B4A, B4J and B4I are the same as B4X. B4X code is "just" a cross-platform code for all, B4A, B4J and B4I.

You want to create a pure Android app. That's what Erel's B4X code does. In principle, it makes absolutely no difference whether the code for B4I or B4J remains in the programme. B4X is cross-platform code and it does not hinder you in developing B4A applications. On the contrary, it creates possibilities under B4A that you did not have before. So why take a step back, remove B4X code from the programme and replace it with pure B4A code? You're going to have trouble doing that. B4X code creates possibilities under Android that you cannot solve with pure B4A code.

In the end, the B4X programme runs through the compiler. It then builds your native Android app and ignores the B4X code for other platforms. So why do you do this work?
 
Upvote 0

BlueVision

Active Member
Licensed User
Longtime User
With all respect, I disagree.
You want to eliminate unnecessary code for B4A within your sourcecode. As said before: In your compiled B4A-application this part of the sourcecode is ignored by the B4A-compiler. So it does simply not exist there. The B4A-compiler is doing the job of eliminating B4J and B4I code from the sourcecode when building the native code for your app. This is not valid for the JAVA code. This is often needed when using B4X for an B4A-application. You run already in trouble by removing it.
 
Last edited:
Upvote 0

BlueVision

Active Member
Licensed User
Longtime User
Sergey, I am not a "god of programming". Android's base is Linux and Java. So why not using it? B4A's compiler (as good as it is) is using this capability's. Why not? With B4A you don't have to use terrible other programming environments (my point of view as an old BASIC-programmer). In principle B4A offers you the opportunity to write code in BASIC and use this then on ANDROID. I don't want to say that it is impossible, nor I have the time to find good workarounds for your problem.
Again, I don't want to make you upset. My intention is to give you an understanding of the things as they are. If you already tried to write code with ECLIPSE, then you know what I mean. There are restrictions in all programming environments. This is also valid for B4A. However, B4A is the best way for success in my opinion.
 
Upvote 0

Brian Dean

Well-Known Member
Licensed User
Longtime User
If it is impossible to create such an application in “pure” B4A, one could say so right away.
Of course it is possible to create this application as a "default" B4A application. The problem is that you are asking other people to spend their time doing this for you - on an exercise that brings them (and you) no benefits. You are asking people to spend their time doing something that you are not prepared to spend the time learning to do for yourself - no wonder that you are running into objections.
 
Upvote 0

Sergey_New

Well-Known Member
Licensed User
Longtime User
no wonder that you are running into objections.
If you had said you didn't want to waste your time, I would have shut up. But instead there were some objections that we should use what we have.
Thank you everyone for your time.
 
Upvote 0
Top