B4J Question [BANano] 'Unexpected token .' Error

Mashiane

Expert
Licensed User
Ola

I'm getting an expected token error due to chaining I'm doing...

B4X:
imgt1.Initialize("imgt1").IsImageButton.SetImage("./assets/icons8-add-row-40.png").SetLabel("Open")
Transpiler Code..

B4X:
_imgt1.initialize("imgt1").isimagebutton()..setimage("./assets/icons8-add-row-40.png").setlabel("Open");
TempSolution:

I have made my sub IsImageButton to receive a variable and changed my code to

B4X:
[CODE]imgt1.Initialize("imgt1").IsImageButton("r").SetImage("./assets/icons8-add-row-40.png").SetLabel("Open")
[/CODE]
 
Top