Skip to content

Commit

Permalink
When the program changes, disable the runButton
Browse files Browse the repository at this point in the history
  • Loading branch information
pauek committed Mar 31, 2011
1 parent 041e8b1 commit ad7e9e5
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions client.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,10 @@ function sessionStart(_session) {
$("#compileButton").button("enable");
}

function sourceCodeChanged() {
$("#runButton").button("disable");
}

function setup(remote) {
var EditSession = require("ace/edit_session").EditSession;
var CppMode = require("ace/mode/c_cpp").Mode;
Expand All @@ -86,6 +90,7 @@ function setup(remote) {
var session = new EditSession(program);
session.setMode(new CppMode());
session.setTabSize(2);
session.on('change', sourceCodeChanged);
editor.setSession(session);

$("#configDialog").dialog({
Expand Down

0 comments on commit ad7e9e5

Please sign in to comment.