seed r796 - trunk/doc
- From: hortont svn gnome org
- To: svn-commits-list gnome org
- Subject: seed r796 - trunk/doc
- Date: Sat, 24 Jan 2009 05:07:48 +0000 (UTC)
Author: hortont
Date: Sat Jan 24 05:07:48 2009
New Revision: 796
URL: http://svn.gnome.org/viewvc/seed?rev=796&view=rev
Log:
Update runtime docs to mention workaround for loading namespaces twice.
Modified:
trunk/doc/runtime.html.in
Modified: trunk/doc/runtime.html.in
==============================================================================
--- trunk/doc/runtime.html.in (original)
+++ trunk/doc/runtime.html.in Sat Jan 24 05:07:48 2009
@@ -19,6 +19,19 @@
<pre class="sh_javascript">
Seed.import_namespace("Gtk", "2.0");
</pre>
+<p>
+Behaviour when loading a namespace which has already been loaded is undefined and most likely unwanted. To work around this, a try/catch block can be used:
+</p>
+<pre class="sh_javascript">
+try
+{
+ Clutter;
+}
+catch(e)
+{
+ Seed.import_namespace("Clutter");
+}
+</pre>
<div class="section"><b>Seed.include</b>(file)</div>
<p>
Evaluates a Javascript <i>file</i> as if it were included in the file at the point include is called.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]