iOS Question switch case is in protected scope

Douglas Farias

Expert
Licensed User
Longtime User
Hi all
yesterday i m compiled my project fine, today same project any changes when i go compile show me this error



I dont know why, i dont find any error on my code.
yesterday i got this error but fixed changing case´s places.

Old
B4X:
Case "casa"
log(1)
Case "carro"
log(2)

new
B4X:
Case "carro"
log("1")
Case "casa"
log(2)

and works yesterday, removed the error, but today this is not working, i cant compile my app
how can i fix this error?
 
Last edited:

Douglas Farias

Expert
Licensed User
Longtime User
i think its a bug on b4i or mac builder
https://www.b4x.com/android/forum/threads/error-detected-with-remote-compile.56013/#content

at this line is
B4X:
       Case "enviasalvos"
       Log(Job.GetString)
        Dim parser As JSONParser
        parser.Initialize(Job.GetString)
        Dim root As Map = parser.NextObject
        'Dim success As String = root.Get("success")
        Dim tickets As List = root.Get("tickets")
        For Each coltickets As Map In tickets
        Dim ticket As String = coltickets.Get("ticket")
       
            QueryMain.BeginTransaction
            Try
            QueryMain.ExecQuery("UPDATE ingressos SET Enviado = '1' WHERE TicketIdOriginal = '"&ticket&"'")
            QueryMain.TransactionSuccessful
            Catch
            If LastException.IsInitialized Then
            Log(LastException.Description) 'ERROR LOG ITS HERE
               End If
            End Try
        Next


this code worked fine yesterday, and its working fine on android now.
only got this error today when i try compile
 
Last edited:
Upvote 0

Douglas Farias

Expert
Licensed User
Longtime User
using if this works, tested now
B4X:
If Job.JobName = "enviasalvos" Then

problem its really with the case on mac builder
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…