B4A User Guide

Gmation

Member
Licensed User
Longtime User
Has anyone (newbies) been able to get the first program (MyFirstProgram) to run?

I swear, I have it codeline for codeline, upper/lowercase, all punctuations and it gives me a parsing error on line 55 which is the edtResult line.
 

Gmation

Member
Licensed User
Longtime User
Also, the user guide diagrams does not match what shows up in my designer but I can get around it.

Is there a more current guide around anywhere?
 
Upvote 0

Gmation

Member
Licensed User
Longtime User
I'm new but I was able to get that program to run ok...

Then I must be missing an outside step of some sort because I checked my program line for line against the sample source which does compile and run so I guess I walk away for a moment then come back to it with new eyes.
 
Upvote 0

Gmation

Member
Licensed User
Longtime User
What error do you get ?
What differences do you see in the 'diagrams' ?
Could you post your project as a zip file (IDE menu Files/Export As Zip) so I could have a look at it.

Best regards.

Hi Klaus and thank you for responding.

This is the error I am getting and I have attached the zip file to this post.

Best regards.

Compiling code. Error
Error parsing program.
Error description: Undeclared variable 'checkresult' is used before it was assigned any value.
Occurred on line: 39
CheckResult
 

Attachments

  • my1stprogram.zip
    6.7 KB · Views: 164
Upvote 0

dagnabitboy

Active Member
Licensed User
Longtime User
Hi! Line 39 contains "checkresult"... you are missing the sub that corresponds.


B4X:
Sub CheckResult
   If edtResult.Text = Number1 + Number2 Then
      lblComments.Text = "G O O D  result" & CRLF & "Click on NEW"
      btnAction.Text = "N E W"
   Else
      lblComments.Text = "W R O N G  result" & CRLF & "Enter a new result" & CRLF & "and click OK"
   End If
End Sub
 
Upvote 0

Gmation

Member
Licensed User
Longtime User
Thanks dagnabit (I love the handle lol).

I assure you I had that bit of code earlier and still hade errors.

I have just replaced it and I am getting this error.

Compiling code. Error
Error compiling program.
Error description: '=' expected.
Occurred on line: 52
edtResult.Text = "" Then'Sets edtResult.Text to empty
Word:

Any other Ideas?
 
Upvote 0

Gmation

Member
Licensed User
Longtime User
Why is "Then" on that line?

Sent from my DROIDX
Because I saw something that wasn't there :)

THANK YOU DroidX; that was it!

MAN! I looked at that code with tooth and nail (whatever that means) and still didn't see that even after I walked away and came back to it.

Thanks again for the extra pair of eyes :)
 
Upvote 0

Gmation

Member
Licensed User
Longtime User
Could you please also answer the above question.

Best regards.
Klaus, I apologize for not answering this part in your original request as I overlooked it and quite frankly, I wasn't sure what you were asking when you say "What's different in the diagrams?"

Nonetheless, you probably have read that my problem has been solved.

Thank you for your help. :)
 
Upvote 0

klaus

Expert
Licensed User
Longtime User
I was refering to your post #2:
Also, the user guide diagrams does not match what shows up in my designer but I can get around it.

Is there a more current guide around anywhere?
That's why I was asking what is different.

Best regards.
 
Upvote 0

Gmation

Member
Licensed User
Longtime User
AHHHH, I remember.

It really is not a problem and I am guessing it probably have something to do with the API that I've installed (API15) which is the only one that had Java exe during my install.

There are only very minor differences such as location of options on screen and more options in my designer than what is in the manual.

I won't try to distinguish them unless it becomes a problem.

Thanks again :)
 
Upvote 0
Top