iOS Question Strange behavior when loading a layout

Cadenzo

Active Member
Licensed User
Longtime User
I am creating an item for xCustomListView (Version: 1.73). If the view-file exists, there is an error on a complete different codeline in another sub:
B4X:
 Dim iPunkteMax As Int = modG.GetDBInt("SELECT MAX(Nr) FROM GameTask WHERE [GameTyp] = " & tGLT.gametyp & " AND [Versuche] >= 0")
But if it does not exists, the IDE gives a warning (codeline 4 is underlined) but it works.

B4X:
Sub CreateListItemRhythmus(btm As Bitmap, score As Int, rhythmus As String, Width As Int, Height As Int) As Panel
    Dim p As B4XView = xui.CreatePanel("") 'Dim p As Panel
    p.SetLayoutAnimated(0, 0, 0, Width, Height)
    p.LoadLayout("viewItmTaskRhtm") '<--- this works only, if the file does not exist
    lblNr.Text = score
    imgStatus.SetBitmap(btm)
    lblItmInfo.Font = Font.CreateNew2("Rhythms", 20) ' lblItmInfo.Typeface = tf
    lblItmInfo.Text = mDrum.GetRhythmusString(rhythmus, True, True, False)
   
    Return p
End Sub

Update: Now it works! After writing this report, I wanted to copy the error-details, but everything is OK. Anyhow I will post it now. May be, there is an simple answer for that behavior. How can a viewfile be loaded, only if it does not exist in the file manager? I remember, that sometimes I had to delete and reinstall my app, because of file management in the iOS device. Is that the same issue?
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…