iOS Question What is the equivalent in B4i ?

alvinmb

Member
Licensed User
Longtime User
Hi,

I have this code snippet in a B4J app and I'm looking for what the equivalent would be in B4i

M_LED_8.SetImage(fx.LoadImage(File.DirAssets, "REDLED.png"))
 

alvinmb

Member
Licensed User
Longtime User
then I don't understand why I would get an error for this code

Private HLED16 As ImageView

If (time_Hour / 16) >= 1 Then

time_Hour = (time_Hour - 16)

HLED16.Bitmap(File.DirAssets,"REDLED.png")

Else

HLED16.Bitmap(File.DirAssets,"GRELED.png")

EndIf

----------------------------------------------

The error is

Parsing code. 0.01
Compiling code. Error
Error compiling program.
Error description: Array expected.
Occurred on line: 120
HLED16.Bitmap(File.DirAssets,"REDLED.png")
Word: (
------------------------------------------------
 
Upvote 0

stevel05

Expert
Licensed User
Longtime User
Because the syntax is incorrect:

B4X:
HLED16.Bitmap = LoadBitmap(File.DirAssets, "REDLED.png")
 
Upvote 0
Top