-
-
Notifications
You must be signed in to change notification settings - Fork 59
{N} app crashes when inspecting SearchBar with VSCode debugger #1085
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Milestone
Comments
5 tasks
The reason for the issue is that optional unimplemented methods were returned as supported by the JS wrapper object.
|
mbektchiev
added a commit
that referenced
this issue
Feb 25, 2019
* Add `isImplementedInClass` and `isAvailableInClass` methods in `PropertyMeta` and `MethodMeta` which additionally check whether a Class instance supports a given optional method * Use `isAvailableInClass` instead of `isAvailable` in `getOwnPropertySlot` of `ObjCPrototype`, `ObjCConstructorBase`, `ObjCConstructorNative` * Add `findInterfaceMeta` function with fallback to base interface if the desired one is unavailable in the current SDK version * Add `encodeVersion` `getMajorVersion` and `getMinorVersion` helpers * Remove hacky patch from `ObjCMethodWrapper::preInvocation` which fixed the symptoms of #978 but not its root cause * Modify fixtures and add test cases for methods availability in `InheritanceTests.js` * Add test case for unavailable base class refs #1085
mbektchiev
added a commit
that referenced
this issue
Feb 27, 2019
* Add `isImplementedInClass` and `isAvailableInClass` methods in `PropertyMeta` and `MethodMeta` which additionally check whether a Class instance supports a given optional method * Use `isAvailableInClass` instead of `isAvailable` in `getOwnPropertyNames` of `ObjCPrototype`, `ObjCConstructorBase`, `ObjCConstructorNative` and in `materializeProperties` of `ObjCConstructorNative` * Filter via `isAvailableInClass` in `BaseClassMeta`'s various method and property getters * Change `MembersCollection` to be a `HashSet` to avoid adding the same member more than once when collecting them from the inheritance chain * Remove unused functions from `BaseClassMeta` * Add `findInterfaceMeta` function with fallback to the base interface if the desired one is unavailable in the current SDK version (instead of the hardcoded `NSObject` so far) * Remove hacky patch from `ObjCMethodWrapper::preInvocation` which fixed the symptoms of #978 but not its root cause. Namely, that unimplemented optional methods were returned as available properties in `getOwnPropertyNames`. * Modify fixtures and add test cases for methods availability in `InheritanceTests.js` * Add test case for unavailable base class * Add test case for property with custom selector. The getter of `secureTextEntry`(`isSecureText`) overrides the default `secureTextEntry` * Add `encodeVersion` `getMajorVersion` and `getMinorVersion` helpers refs #1085
mbektchiev
added a commit
that referenced
this issue
Feb 28, 2019
* Add `isImplementedInClass` and `isAvailableInClass` methods in `PropertyMeta` and `MethodMeta` which additionally check whether a Class instance supports a given optional method * Use `isAvailableInClass` instead of `isAvailable` in `getOwnPropertyNames` of `ObjCPrototype`, `ObjCConstructorBase`, `ObjCConstructorNative` and in `materializeProperties` of `ObjCConstructorNative` * Filter via `isAvailableInClass` in `BaseClassMeta`'s various method and property getters * Change `MembersCollection` to be a `HashSet` to avoid adding the same member more than once when collecting them from the inheritance chain * Remove unused functions from `BaseClassMeta` * Add `findInterfaceMeta` function with fallback to the base interface if the desired one is unavailable in the current SDK version (instead of the hardcoded `NSObject` so far) * Remove hacky patch from `ObjCMethodWrapper::preInvocation` which fixed the symptoms of #978 but not its root cause. Namely, that unimplemented optional methods were returned as available properties in `getOwnPropertyNames`. * Modify fixtures and add test cases for methods availability in `InheritanceTests.js` * Add test case for unavailable base class * Add test case for property with custom selector in ApiTests. The getter of `secureTextEntry`(`isSecureText`) overrides the default `secureTextEntry` * Add `encodeVersion` `getMajorVersion` and `getMinorVersion` helpers refs #1085
mbektchiev
added a commit
that referenced
this issue
Feb 28, 2019
* Add `isImplementedInClass` and `isAvailableInClass` methods in `PropertyMeta` and `MethodMeta` which additionally check whether a Class instance supports a given optional method * Use `isAvailableInClass` instead of `isAvailable` in `getOwnPropertyNames` of `ObjCPrototype`, `ObjCConstructorBase`, `ObjCConstructorNative` and in `materializeProperties` of `ObjCConstructorNative` * Filter via `isAvailableInClass` in `BaseClassMeta`'s various method and property getters * Change `MembersCollection` to be a `HashSet` to avoid adding the same member more than once when collecting them from the inheritance chain * Remove unused functions from `BaseClassMeta` * Add `findInterfaceMeta` function with fallback to the base interface if the desired one is unavailable in the current SDK version (instead of the hardcoded `NSObject` so far) * Remove hacky patch from `ObjCMethodWrapper::preInvocation` which fixed the symptoms of #978 but not its root cause. Namely, that unimplemented optional methods were returned as available properties in `getOwnPropertyNames`. * Modify fixtures and add test cases for methods availability in `InheritanceTests.js` * Add test case for unavailable base class * Add test case for property with custom selector in ApiTests. The getter of `secureTextEntry`(`isSecureText`) overrides the default `secureTextEntry` * Add `encodeVersion` `getMajorVersion` and `getMinorVersion` helpers refs #1085
5 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Environment
Provide version numbers for the following components (information can be retrieved by running
tns info
in your project folder or by inspecting thepackage.json
of the project):To Reproduce
tns create jsApp --js && cd jsApp && code .
<Button
with a<SearchBar
.onTap
method with the one below:Launch on iOS
from VSCode.nativeView
of the SearchBar.The text was updated successfully, but these errors were encountered: