You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@weex.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2018/01/23 08:53:00 UTC
[jira] [Commented] (WEEX-200) deprecate WXCallback and
WXModuleCallback callback type
[ https://issues.apache.org/jira/browse/WEEX-200?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16335520#comment-16335520 ]
ASF GitHub Bot commented on WEEX-200:
-------------------------------------
GitHub user acton393 opened a pull request:
https://github.com/apache/incubator-weex/pull/1000
[WEEX-200][iOS] deprecate wxcallback and wxmodulecallback
As iOS developers knows, we cannot distinguish the block by its params count, but it has been a time we use the default value of block parameter, I find out that the default value could be dirty data.
here is the callback type definition.
typedef void (^WXCallback)(_Nonnull id result)
typedef void (^WXKeepAliveCallback)(_Nonnull id result, BOOL keepAlive);
when the method called, weexSDK will set the callback according to the @encode result,
but these two type's encode result are all "?", see more encode result from Apple Documents https://developer.apple.com/library/content/documentation/Cocoa/Conceptual/ObjCRuntimeGuide/Articles/ocrtTypeEncodings.html
Bug:200
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/acton393/incubator-weex ios-deprecated-wxcallback
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/incubator-weex/pull/1000.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #1000
----
commit dab9436e427693c5b6e08e755e7e56f328257731
Author: acton393 <zh...@...>
Date: 2018-01-23T08:51:29Z
[WEEX-200][iOS] deprecate wxcallback and wxmodulecallback
As iOS developers knows, we cannot distinguish the block by its params count, but it has been a time we use the default value of block parameter, I find out that the default value could be dirty data.
here is the callback type definition.
typedef void (^WXCallback)(_Nonnull id result)
typedef void (^WXKeepAliveCallback)(_Nonnull id result, BOOL keepAlive);
when the method called, weexSDK will set the callback according to the @encode result,
but these two type's encode result are all "?", see more encode result from Apple Documents https://developer.apple.com/library/content/documentation/Cocoa/Conceptual/ObjCRuntimeGuide/Articles/ocrtTypeEncodings.html
Bug:200
----
> deprecate WXCallback and WXModuleCallback callback type
> --------------------------------------------------------
>
> Key: WEEX-200
> URL: https://issues.apache.org/jira/browse/WEEX-200
> Project: Weex
> Issue Type: Bug
> Components: iOS
> Reporter: xingZhang
> Assignee: xingZhang
> Priority: Major
>
> As iOS developers knows, we cannot distinguish the block by its params count, but it has been a time we use the default value of block parameter, I find out that the default value could be dirty data.
>
> here is the callback type definition.
> typedef void (^WXCallback)(_Nonnull id result)
> typedef void (^WXKeepAliveCallback)(_Nonnull id result, BOOL keepAlive);
>
> when the method called, weexSDK will set the callback according to the @encode result,
> but these two type's encode result are all "?", see more encode result from Apple Documents [https://developer.apple.com/library/content/documentation/Cocoa/Conceptual/ObjCRuntimeGuide/Articles/ocrtTypeEncodings.html]
>
>
>
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)