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
Common API proc (lambda) callbacks are broken on Android platform. They get messages like:
Error Setting callback ^^^
This is easily demonstrated using getProperty, getAllProperties or getProperties on any common API, and supply a lambda callback. (Since these both use optional callback.)
it works correctly on iOS platform.
Note also that URL callbacks do work on Android platform.
This means not only can developers not create extensions that have lambda-function callbacks, this also breaks internal API functionality like getAllProperties and getProperties.
I did a search, and in fact these three methods seem to be the only instances of optional callbacks in Rhodes (as of 5.0.30).
The text was updated successfully, but these errors were encountered:
jtara
changed the title
Common API: (Android) optional callbacks are broken
Common API: (Android) optional lambda callbacks are broken
May 4, 2015
jtara
changed the title
Common API: (Android) optional lambda callbacks are broken
Common API: (Android) lambda callbacks are broken
May 5, 2015
I updated the title and text above. I'd previously said that only optional proc callbacks were broken. In fact, both optional and mandatory proc callbacks are broken.
Note that this affects ONLY common-API extensions that use generated common-API code. For built-in APIs, this affects ONLY getProperty, getAllProperties and getProperties. Other APIs (e.g. Network) I believe do not use generated common-API code but have combined the generated boilerplate code with the implementation code.
Workaround: do not use lambda callbacks with user-developed APIs (if using generated common API base). They do not work on Android platform.
As well, getProperty, getAllProperties, getProperty are not usable on Android with a Lambda callback - so only use URL callbacks for these 3 methods.
FYI, I do use Network lambda callbacks on Android, and they do work. But I cannot use it in my own extensions.
jtara
changed the title
Common API: (Android) lambda callbacks are broken
Common API: (Android) proc (lambda) callbacks are broken
May 5, 2015
method callbacks seem broken on Android platform as well. They work on iOS, though I think are of dubious value, and are not documented. (I got this from the source code.)
This works on iOS. Does not on Android. Same error, error setting callback.
# Test method callback# Note class methodRho::BonjourBrowser.callbackTest(self.class.method(:on_test_callback_method))# Note class method. This is undocumeted, discovered in source code.defself.on_test_callback_method(params)puts"on_test_callback_method params = #{params.inspect}"end
Common API proc (lambda) callbacks are broken on Android platform. They get messages like:
This is easily demonstrated using
getProperty
,getAllProperties
orgetProperties
on any common API, and supply a lambda callback. (Since these both use optional callback.)it works correctly on iOS platform.
Note also that URL callbacks do work on Android platform.
This means not only can developers not create extensions that have lambda-function callbacks, this also breaks internal API functionality like
getAllProperties
andgetProperties
.I did a search, and in fact these three methods seem to be the only instances of optional callbacks in Rhodes (as of 5.0.30).
The text was updated successfully, but these errors were encountered: