~azzar1/unity/add-show-desktop-key

« back to all changes in this revision

Viewing changes to www/media/console/console.js

  • Committer: drtomc
  • Date: 2008-03-05 00:23:33 UTC
  • Revision ID: svn-v3-trunk0:2b9c9e99-6f39-0410-b283-7f802c844ae2:trunk:646
console: - work around the ff bug with the cursor.
         - somewhat nicer handling of the backend python interpreter
           going away. Nicer handling is somewhat tricker and can happen
           later when we have more time.

Show diffs side-by-side

added added

removed removed

Lines of Context:
266
266
 
267
267
function console_response(inputbox, graytimer, inputline, responseText)
268
268
{
269
 
    var res = JSON.parse(responseText);
 
269
    try
 
270
    {
 
271
        var res = JSON.parse(responseText);
 
272
    }
 
273
    catch (e)
 
274
    {
 
275
        alert("An internal error occurred in the python console.");
 
276
        return;
 
277
    }
270
278
    var output = document.getElementById("console_output");
271
279
    if (res.hasOwnProperty('okay'))
272
280
    {
348
356
    divScroll.activeScroll();
349
357
 
350
358
    // Focus the input box by default
351
 
    // document.getElementById("console_inputText").focus()
 
359
    document.getElementById("console_output").focus()
 
360
    document.getElementById("console_inputText").focus()
352
361
}
353
362
 
354
363
function catch_input(key)