B4J Question Undeclared variable in tutorialWYG

AndyT

New Member
I'm new to B4X so I guess I've done something wrong in my configuration.

Following the documentation, I installed the programs and configured as in the documentation with the javac.exe path set to "C:\java\jdk-11.0.1\bin\javac.exe".
I then followed the instructions in "B4X Getting started (Chapter 3)" to create "MyFirstProgram".

I can see on my WYSIWYG window my created example but when try to compile it I get the following error:

B4XMainPage - 49: Syntax error.
B4XMainPage - 56: Undeclared variable 'txfresult' is used before it was assigned any value.
B4XMainPage - 44: Undeclared variable 'txfresult' is used before it was assigned any value.


I checked through the code and can only find txfResult referenced in btnAction_Click and CheckResult Private Subs but nowhere is it defined.

I guess I am missing something very basic but I can't find an answer in the documentation.

Thanks for and help.
 

klaus

Expert
Licensed User
Longtime User
You should change, in the Designer, the view name from txfResult to edtResult.
The name of txfResult was used in the 'old' pure B4J project, I changed it in the B4XPages cross-platform project to edtResult.

I have checked the Getting started booklet and I have seen that the images are not up to date.
They show txfResult instead of edtResult like in the text.
This has been updated for the next edition.
 
Upvote 0

AndyT

New Member
Many thanks Klaus and Tedybear for your quick response and I look forward to learning more of B4X!
It now compiles correctly.
 
Upvote 0
Top