seed r484 - in trunk: doc libseed
- From: hortont svn gnome org
- To: svn-commits-list gnome org
- Subject: seed r484 - in trunk: doc libseed
- Date: Thu, 18 Dec 2008 00:36:21 +0000 (UTC)
Author: hortont
Date: Thu Dec 18 00:36:21 2008
New Revision: 484
URL: http://svn.gnome.org/viewvc/seed?rev=484&view=rev
Log:
Add Seed.readline_bind to docs, remove comment suggesting its addition.
Modified:
trunk/doc/runtime.html
trunk/libseed/seed-builtins.c
Modified: trunk/doc/runtime.html
==============================================================================
--- trunk/doc/runtime.html (original)
+++ trunk/doc/runtime.html Thu Dec 18 00:36:21 2008
@@ -121,6 +121,15 @@
var input = Seed.readline("prompt> ");
Seed.print(input);
</pre>
+<div class="section"><b>Seed.readline_bind</b>(key, function)</div>
+<p>
+Binds <i>key</i>, any valid ASCII character, to <i>function</i>. If the given key is then pressed while at a <b>Seed.readline</b> prompt, the passed function will be called.
+</p>
+<pre>
+Seed.readline_bind("q", function () { Seed.quit() });
+var num = Seed.readline("Enter a number, or q to quit:");
+Seed.print(num);
+</pre>
<div class="section"><b>Seed.check_syntax</b>(code)</div>
<p>
Examines a segment of Javascript, looking for syntax errors. If errors are found, an exception is thrown, which can be caught with a try/catch block.
Modified: trunk/libseed/seed-builtins.c
==============================================================================
--- trunk/libseed/seed-builtins.c (original)
+++ trunk/libseed/seed-builtins.c Thu Dec 18 00:36:21 2008
@@ -180,10 +180,6 @@
size_t argumentCount,
const JSValueRef arguments[], JSValueRef * exception)
{
- // TODO: Should add an interface to rl_bind_key
- // Perhaps Seed.readline_bind('a', function)
- // Then automagically do function stuff and make it happen!
-
JSValueRef valstr = 0;
gchar *str = 0;
gchar *buf;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]