Undeclared Layout: How to declared Layout

jeeradate

Member
Licensed User
Longtime User
I create 3 activities in my project and "PriceEntry" is one of them.
I create the layout in Designer for "PriceEntry" Activity.
When I start to run the project and system ask for "Label" but I don't tell the system the Layout label. And it show the below error.


Compiling code. Error
Error parsing program.
Error description: Undeclared variable 'priceentry' is used before it was assigned any value.
Occurred on line: 32
Activity.LoadLayout(PriceEntry)



The code that cause error

B4X:
Sub Activity_Create(FirstTime As Boolean)
32--->    Activity.LoadLayout(PriceEntry)
       lblPrice.Text = ""
End Sub
Would you please be kind and advise how to solve this problem?
:sign0104:
 
Last edited:

jeeradate

Member
Licensed User
Longtime User
The layout name should be in quotes, like this:
B4X:
Activity.LoadLayout("PriceEntry")

Thank you for your kind advice.

It is OK with your advice.
 
Last edited:
Upvote 0
Top