You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I had the following issue:
I had a abstract super class A with subclass B and subclass C. Than I had a block callback that got a object of type A as a parameter. But type A was never actually passed, only either B or C.
Than in the callback I had something like:
if (paramAinstanceofB) {
// Do x
} elseif (paramAinstanceofC) {
// Do y
}
The problem was now, that I have never referenced class B or C directly, so their static init block with NatJ.register() was never executed.
When now the callback was called NatJ created a binding java object A for the ObjC classes B and C, so my "instanceof" code wasn't working correctly.
It would be probably good to have NatJ print a warning in such cases, something like "No binding class for ObjC class B/C was registered, falling back to superclass binding A".
The text was updated successfully, but these errors were encountered:
I had the following issue:
I had a abstract super class A with subclass B and subclass C. Than I had a block callback that got a object of type A as a parameter. But type A was never actually passed, only either B or C.
Than in the callback I had something like:
The problem was now, that I have never referenced class B or C directly, so their static init block with
NatJ.register()
was never executed.When now the callback was called NatJ created a binding java object A for the ObjC classes B and C, so my "instanceof" code wasn't working correctly.
It would be probably good to have NatJ print a warning in such cases, something like "No binding class for ObjC class B/C was registered, falling back to superclass binding A".
The text was updated successfully, but these errors were encountered: