[Kst] branches/work/kst/1.6/kst/src/extensions/js
Andrew Walker
arwalker at sumusltd.com
Wed Jan 9 00:02:36 CET 2008
SVN commit 758736 by arwalker:
give error message if plugin module could not be set
M +12 -0 bind_kst.h
M +6 -0 bind_plugin.cpp
M +1 -1 bind_pluginio.cpp
--- branches/work/kst/1.6/kst/src/extensions/js/bind_kst.h #758735:758736
@@ -45,11 +45,13 @@
@returns boolean True if the file was successfully loaded and executed.
*/
KJS::Value loadScript(KJS::ExecState *exec, const KJS::List& args);
+
/* @method resetInterpreter
@description Resets the KstScript interpreter. All variables will be
lost.
*/
KJS::Value resetInterpreter(KJS::ExecState *exec, const KJS::List& args);
+
/* @method purge
@description Purges unused objects in Kst. The has the same behavior as
the purge button in the data manager.
@@ -61,53 +63,63 @@
@description The list of all loaded data sources.
*/
KJS::Value dataSources(KJS::ExecState *exec) const;
+
/* @property ScalarCollection scalars
@readonly
@description The list of all scalars in Kst.
*/
KJS::Value scalars(KJS::ExecState *exec) const;
+
/* @property StringCollection strings
@readonly
@description The list of all strings in Kst.
*/
KJS::Value strings(KJS::ExecState *exec) const;
+
/* @property VectorCollection vectors
@readonly
@description The list of all vectors in Kst.
*/
KJS::Value vectors(KJS::ExecState *exec) const;
+
/* @property WindowCollection windows
@readonly
@description The list of all Kst windows in this process.
*/
KJS::Value windows(KJS::ExecState *exec) const;
+
/* @property DataObjectCollection objects
@readonly
@description The list of all data objects in Kst.
*/
KJS::Value objects(KJS::ExecState *exec) const;
+
/* @property ColorSequence colors
@readonly
@description A reference to the Kst color sequence in its current state.
*/
KJS::Value colors(KJS::ExecState *exec) const;
+
/* @property ExtensionCollection extensions
@readonly
@description The list of all extensions Kst can find installed on the
system.
*/
KJS::Value extensions(KJS::ExecState *exec) const;
+
/* @property Document document
@readonly
@description An object that provides access to the current Kst document
along with various utility functions.
*/
KJS::Value document(KJS::ExecState *exec) const;
+
/* @property PluginManager pluginManager
@readonly
@description A reference to the plugin management subsystem of Kst.
*/
KJS::Value pluginManager(KJS::ExecState *exec) const;
+
/* @property QWidget gui
@readonly
@description A reference to the Kst GUI. This is implemented using
--- branches/work/kst/1.6/kst/src/extensions/js/bind_plugin.cpp #758735:758736
@@ -230,6 +230,12 @@
if (d) {
KstWriteLocker wl(d);
d->setPlugin(m);
+
+ if (!d->plugin()) {
+ KJS::Object eobj = KJS::Error::create(exec, KJS::GeneralError, "Failed to set module");
+ exec->setException(eobj);
+ return;
+ }
}
}
}
--- branches/work/kst/1.6/kst/src/extensions/js/bind_pluginio.cpp #758735:758736
@@ -112,7 +112,7 @@
return (this->*pluginIOProperties[i].get)(exec);
}
}
-
+
return KstBinding::get(exec, propertyName);
}
More information about the Kst
mailing list