Show More
@@ -243,14 +243,25 b' var IPython = (function (IPython) {' | |||||
243 | this.output_area.clear_output(); |
|
243 | this.output_area.clear_output(); | |
244 | this.set_input_prompt('*'); |
|
244 | this.set_input_prompt('*'); | |
245 | this.element.addClass("running"); |
|
245 | this.element.addClass("running"); | |
246 | var callbacks = { |
|
246 | if (this.last_msg_id) { | |
|
247 | this.kernel.clear_callbacks_for_msg(this.last_msg_id); | |||
|
248 | } | |||
|
249 | var callbacks = this.get_callbacks(); | |||
|
250 | ||||
|
251 | this.last_msg_id = this.kernel.execute(this.get_text(), callbacks, {silent: false, store_history: true}); | |||
|
252 | }; | |||
|
253 | ||||
|
254 | /** | |||
|
255 | * Construct the default callbacks for | |||
|
256 | * @method get_callbacks | |||
|
257 | */ | |||
|
258 | CodeCell.prototype.get_callbacks = function () { | |||
|
259 | return { | |||
247 | shell : { |
|
260 | shell : { | |
248 | reply : $.proxy(this._handle_execute_reply, this), |
|
261 | reply : $.proxy(this._handle_execute_reply, this), | |
249 | payload : { |
|
262 | payload : { | |
250 | set_next_input : $.proxy(this._handle_set_next_input, this), |
|
263 | set_next_input : $.proxy(this._handle_set_next_input, this), | |
251 | page : function (payload) { |
|
264 | page : $.proxy(this._open_with_pager, this) | |
252 | $([IPython.events]).trigger('open_with_text.Pager', payload); |
|
|||
253 | } |
|
|||
254 | } |
|
265 | } | |
255 | }, |
|
266 | }, | |
256 | iopub : { |
|
267 | iopub : { | |
@@ -259,8 +270,10 b' var IPython = (function (IPython) {' | |||||
259 | }, |
|
270 | }, | |
260 | input : $.proxy(this._handle_input_request, this) |
|
271 | input : $.proxy(this._handle_input_request, this) | |
261 | }; |
|
272 | }; | |
262 |
|
273 | }; | ||
263 | this.last_msg_id = this.kernel.execute(this.get_text(), callbacks, {silent: false, store_history: true}); |
|
274 | ||
|
275 | CodeCell.prototype._open_with_pager = function (payload) { | |||
|
276 | $([IPython.events]).trigger('open_with_text.Pager', payload); | |||
264 | }; |
|
277 | }; | |
265 |
|
278 | |||
266 | /** |
|
279 | /** |
General Comments 0
You need to be logged in to leave comments.
Login now