iOS Question lmB4XImageView Error

mcqueccu

Well-Known Member
Licensed User
Longtime User
Using Version 2.0 works fine in B4A but in B4i, by just adding the library you get this error in the log.
@LucaMs

B4X:
Syntax error.
',' expected.

And when you run you get this
B4X:
B4i Version: 8.51
Parsing code.    (0.02s)
Building folders structure.    (0.01s)
Running custom action.    (0.06s)
Compiling code.    Error
Error compiling program.
Error description: ',' expected.
Error occurred on line: 280
If SubExists(mCallBack, SubFullName) Then
Word: )
 

Attachments

  • Project.zip
    8.4 KB · Views: 85

Alexander Stolte

Expert
Licensed User
Longtime User
If SubExists(mCallBack, SubFullName) Then
@LucaMs use cross plattform code for this:
B4X:
    If xui.SubExists(mCallBack, mEventName & "_TrailingIconClick",0) Then
        CallSub(mCallBack, mEventName & "_TrailingIconClick")
    End If
in B4I SubExists has 3 Parameters, this is why you should use the function from the xui lib.
 
Upvote 0

LucaMs

Expert
Licensed User
Longtime User
I hadn't seen that (nor this...)

1712557245187.png
 
Upvote 0

mcqueccu

Well-Known Member
Licensed User
Longtime User
v2.1.1
B4A OK
B4J OK

B4i NOT OK


B4X:
B4i Version: 8.51
Parsing code.    (0.04s)
Building folders structure.    (0.03s)
Running custom action.    (0.04s)
Compiling code.    Error
Error compiling program.
Error description: ',' expected.
Error occurred on line: 198
pnlOver.SetLayoutAnimated(0, iv.Left, iv.Top, iv.Width, iv.Height)
Word: )

1712562518820.png
 
Upvote 0

Alexander Stolte

Expert
Licensed User
Longtime User
@LucaMs dont use pane or panel, use B4XView for panels and labels. Only then its 100% B4X.
1712562794988.png

Because .SetLayoutAnimated on B4I for the Panel has one more paramater.
So I don't know why you are turning the B4XView into a panel or pane again. Even if you need to access platform-specific things, you can still control it with #If B4A or #If B4J and then call platform-specific things with the .As(Pane).SpecialB4JFunctionForPane.

@LucaMs you can also write to me privately if you develop something that should also work in B4I, then I'll take a look at it
 
Last edited:
Upvote 0
Top