Bug? Not sure if this is a bug of the compiler or not.

ivanthomson

Member
Licensed User
Longtime User
I thought I would mention this in case it is a bug.

The compiler will let this statement pass thorough;

Activity.AddMenuItem("Settings",settings)

Even though it should be;

Activity.AddMenuItem("Settings","settings")

I guess it does so in case you use a string variable in place of the sub name. Anyway, the compiler doesn't check to see if the actual value is a declared and set string though. It just passes it right through to the device and the app crashes on the device with a cryptic java error claiming a button was not initialized.

It took me awhile to hunt this mistake down, so I thought I would post it in case someone else has a similar problem.

Thanks.
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
You should get a compilation error:
SS-2014-12-19_10.04.02.png


I guess that you have a variable or module named settings.
 
Top