iOS Question Loadlayout with 2 Parameter ?

Filippo

Expert
Licensed User
Longtime User
Hi,

suddenly the function "LoadLayout" requires 2 parameters?
Is this an error?

B4i Version: 7.80
Parsing code. (0.00s)
Building folders structure. (0.04s)
Compiling code. Error
Error compiling program.
Error description: ',' expected.
Error occurred on line: 38
mBase.LoadLayout("layspeedbar")
Word: )
 

Filippo

Expert
Licensed User
Longtime User
What is the type of mBase?
Here is my code:
B4X:
Sub Class_Globals
    Private mEventName As String 'ignore
    Private mCallBack As Object 'ignore
    Public mBase As B4XView
    Private xui As XUI 'ignore
    Public Tag As Object
    Private IsReady As Boolean
End Sub

Public Sub Initialize (Callback As Object, EventName As String)
    mEventName = EventName
    mCallBack = Callback
End Sub

'Base type must be Object
Public Sub DesignerCreateView (Base As Object, Lbl As Label, Props As Map)
    mBase = Base
    Tag = mBase.Tag
    mBase.Tag = Me
    
    CallSubDelayed3(Me, "AfterLoadLayout", Lbl, Props)
End Sub

Private Sub AfterLoadLayout(Lbl As Label, Props As Map) 'ignore
    mBase.LoadLayout("layspeedbar")       
    
    IsReady = True
End Sub
 
Upvote 0

LucaMs

Expert
Licensed User
Longtime User
Then mBase is "the classic" B4XView pane/panel (your custom view, right?) and that LoadLayout is correct. The error message is "wrong", because of some strange reason.
Are you sure that line 38 is
mBase.LoadLayout("layspeedbar")
?
Try to clean the project (CTRL+P)
 
Upvote 0

Filippo

Expert
Licensed User
Longtime User
Look at this screenshot, in B4a the line is not shown as an error, in B4i it is shown as an error.
 
Upvote 0

Filippo

Expert
Licensed User
Longtime User
Ich change mBase from type B4XView to Panel, then it work.
B4X:
Public mBase As Panel ' B4XView
Is this normal?
 
Upvote 0

klaus

Expert
Licensed User
Longtime User
I checked your project.
When I load it, I get an error message, XUI library is missing.

When I check the iXUI library in the Libraries Manager Tab, the error disappears
and the LoadLayout is OK.


Do you have somewhere an old iXUI library, mine is version 2.11, the internal library?
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…