[sword-svn] r3534 - trunk/bindings/cordova/org.crosswire.sword.cordova.SWORD/src/ios
scribe at crosswire.org
scribe at crosswire.org
Sun Nov 26 02:16:27 MST 2017
Author: scribe
Date: 2017-11-26 02:16:27 -0700 (Sun, 26 Nov 2017)
New Revision: 3534
Modified:
trunk/bindings/cordova/org.crosswire.sword.cordova.SWORD/src/ios/SWORD.swift
Log:
added setJavascript to swift bindings and fixed getEntryAttribute bug
Modified: trunk/bindings/cordova/org.crosswire.sword.cordova.SWORD/src/ios/SWORD.swift
===================================================================
--- trunk/bindings/cordova/org.crosswire.sword.cordova.SWORD/src/ios/SWORD.swift 2017-11-26 08:49:22 UTC (rev 3533)
+++ trunk/bindings/cordova/org.crosswire.sword.cordova.SWORD/src/ios/SWORD.swift 2017-11-26 09:16:27 UTC (rev 3534)
@@ -376,7 +376,8 @@
initMgr()
let mod = getModule(command: command)
if (mod != 0) {
- let retVal = String(cString: org_crosswire_sword_SWModule_getConfigEntry(mod, command.arguments[1] as? String ?? ""))
+ let val = org_crosswire_sword_SWModule_getConfigEntry(mod, command.arguments[1] as? String ?? "")
+ let retVal = val == nil ? nil : String(cString: val!)
self.commandDelegate!.send(CDVPluginResult(status: CDVCommandStatus_OK, messageAs: retVal), callbackId: command.callbackId)
}
else {
@@ -785,6 +786,14 @@
self.commandDelegate!.send(CDVPluginResult(status: CDVCommandStatus_OK, messageAs: "InstallMgr_setUserDisclaimerConfirmed"), callbackId: command.callbackId)
}
+
+ @objc(SWMgr_setJavascript:)
+ func SWMgr_setJavascript(command: CDVInvokedUrlCommand) {
+ initMgr()
+ org_crosswire_sword_SWMgr_setJavascript(mgr, command.arguments[0] as? Bool ?? true ? 1 : 0)
+ self.commandDelegate!.send(CDVPluginResult(status: CDVCommandStatus_OK, messageAs: "SWMgr_setJavascript"), callbackId: command.callbackId)
+ }
+
@objc(SWMgr_getModInfoList:)
func SWMgr_getModInfoList(command: CDVInvokedUrlCommand) {
initMgr()
More information about the sword-cvs
mailing list