iOS Question WKWebView: Multiple Views Sharing an Event Issue

dbalman

Member
Licensed User
Longtime User
Given two separate WKWebViews with a common event name (e.g., WKWebView), why does this code cause the build to fail?

B4X:
Sub WKWebView_PageFinished (Success As Boolean, Url As String)
    Dim wk As WKWebView = Sender
    Log(WkWebView.BaseView.Tag)
End Sub

B4i version: 3.00
Parsing code. (0.04s)
Compiling code. (0.19s)
Compiling layouts code. (0.00s)
Compiling debugger engine code. (6.65s)
Building Xcode project (0.10s)
Sending data to remote compiler. Error
B4i line: 437
Dim wk As WKWebView = Sender
expected expression

However, if I comment the code block, run the program in debug mode, and uncomment the code block with a hotswap, it works as expected.
 

dbalman

Member
Licensed User
Longtime User
I attached a small example.
However, if I comment the code block, run the program in debug mode, and uncomment the code block with a hotswap, it works as expected.

Cleaning the project and attempting to run it again after this will cause it to fail again.
 

Attachments

  • WKWebView Example.zip
    2.2 KB · Views: 283
Upvote 0
Top