Ho provato questo codice per fare il rfresh di una pagina
Ma quado lo eseguo ricevo questo errore
B4X:
Sub refresh_Click
Dim no As NativeObject= paginaweb
no.RunMethod("stringByEvaluatingJavaScriptFromString:", Array("window.location.reload();"))
'paginacaricata= paginaweb.Initialize
'paginaweb.LoadUrl(paginacaricata)
End Sub
Ma quado lo eseguo ricevo questo errore
B4X:
Copying updated assets files (27)
Application_Start
Application_Active
Error occurred on line: 99 (Main)
Method not found: stringByEvaluatingJavaScriptFromString:, target: <WKWebView: 0x16357c00; frame = (0 106.764; 1024 641.236); layer = <CALayer: 0x15564d10>>
Stack Trace: (
CoreFoundation <redacted> + 152
libobjc.A.dylib objc_exception_throw + 38
CoreFoundation <redacted> + 0
Sulcis Food Menu +[B4I runDynamicMethod:method:throwErrorIfMissing:args:] + 354
Sulcis Food Menu -[B4INativeObject RunMethod::] + 162
Sulcis Food Menu -[b4i_main _refresh_click] + 790
CoreFoundation <redacted> + 68
CoreFoundation <redacted> + 300
Sulcis Food Menu +[B4I runDynamicMethod:method:throwErrorIfMissing:args:] + 1488
Sulcis Food Menu -[B4IShell runMethod:] + 588
Sulcis Food Menu -[B4IShell raiseEventImpl:method:args::] + 1908
Sulcis Food Menu -[B4IShellBI raiseEvent:event:params:] + 1328
Sulcis Food Menu __33-[B4I raiseUIEvent:event:params:]_block_invoke + 56
libdispatch.dylib <redacted> + 10
libdispatch.dylib <redacted> + 22
libdispatch.dylib _dispatch_main_queue_callback_4CF + 902
CoreFoundation <redacted> + 8
CoreFoundation <redacted> + 848
CoreFoundation CFRunLoopRunSpecific + 470
CoreFoundation CFRunLoopRunInMode + 104
GraphicsServices GSEventRunModal + 80
UIKit UIApplicationMain + 150
Sulcis Food Menu main + 90
libdyld.dylib <redacted> + 2
)