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
{{ message }}
This repository was archived by the owner on May 1, 2020. It is now read-only.
I found two cases where the return value from a factory does not match the returnType defined in the supplied api.jsca.
Of note Ti.Database.open does not return a Ti.Database.DB object. To test see if the object returned has anexecute()` method.
Ti.UI.iOS.createToolbar does not return a Ti.UI.iOS.Toolbar object. I found it is missing the show() and hide() methods inherited from Ti.UI.View.
Is it possible that the returnType in the api.jsca is being ignored? I eventually had to polyfill my methods:
global.Ti.UI.iOS.createToolbar= (props) ->toolbar= {}
toolbar[key] = val for key,val ofTi.UI.iOS.Toolbar
toolbar[key] = val for key,val of props
toolbar
If I find I do this often I'll use a pollyfill function:
pollyfillTi= (returnType) -> (props) ->retObj= {}
retObj[key] = val for key,val of returnType
retObj[key] = val for key,val of props
retObj
global.Ti.UI.iOS.createToolbar=pollyfillTi(Ti.UI.iOS.Toolbar)
I found two cases where the return value from a factory does not match the
returnType
defined in the suppliedapi.jsca
.Of note
Ti.Database.open
does not return aTi.Database.DB object. To test see if the object returned has an
execute()` method.Ti.UI.iOS.createToolbar
does not return aTi.UI.iOS.Toolbar
object. I found it is missing theshow()
andhide()
methods inherited fromTi.UI.View
.Is it possible that the
returnType
in theapi.jsca
is being ignored? I eventually had to polyfill my methods:In JS:
The text was updated successfully, but these errors were encountered: