##// END OF EJS Templates
only pass shell.reply callback to oinfo / complete...
MinRK -
Show More
@@ -150,10 +150,7 b' var IPython = (function (IPython) {'
150 150 matched_text: ""
151 151 })
152 152 } else {
153 var callbacks = { shell : {
154 reply: $.proxy(this.finish_completing, this)
155 }};
156 this.cell.kernel.complete(line, cur.ch, callbacks);
153 this.cell.kernel.complete(line, cur.ch, $.proxy(this.finish_completing, this));
157 154 }
158 155 };
159 156
@@ -218,8 +218,7 b' var IPython = (function (IPython) {'
218 218 // remove everything after last open bracket
219 219 line = line.replace(endBracket, "");
220 220 return Tooltip.last_token_re.exec(line)
221 }
222
221 };
223 222
224 223 Tooltip.prototype._request_tooltip = function (cell, line) {
225 224 var callbacks = { shell : {
@@ -242,27 +242,26 b' var IPython = (function (IPython) {'
242 242 };
243 243
244 244 /**
245 * Get info on object asynchronoulsy
245 * Get info on an object
246 246 *
247 247 * @async
248 248 * @param objname {string}
249 * @param callback {dict}
250 * @method object_info_request
249 * @param callback {function}
250 * @method object_info
251 251 *
252 252 * @example
253 253 *
254 * When calling this method pass a callbacks structure of the form:
255 *
256 * callbacks = {
257 * 'object_info_reply': object_info_reply_callback
258 * }
259 *
260 * The `object_info_reply_callback` will be passed the content object of the
254 * When calling this method pass a callback function that expects one argument.
261 255 *
262 * `object_into_reply` message documented in
256 * The callback will be passed the complete `object_info_reply` message documented in
263 257 * [IPython dev documentation](http://ipython.org/ipython-doc/dev/development/messaging.html#object-information)
264 258 */
265 Kernel.prototype.object_info_request = function (objname, callbacks) {
259 Kernel.prototype.object_info = function (objname, callback) {
260 var callbacks;
261 if (callback) {
262 callbacks = { shell : { reply : callback } };
263 }
264
266 265 if (typeof(objname) !== null && objname !== null) {
267 266 var content = {
268 267 oname : objname.toString(),
@@ -349,25 +348,26 b' var IPython = (function (IPython) {'
349 348 };
350 349
351 350 /**
352 * When calling this method pass a callbacks structure of the form:
353 *
351 * When calling this method pass a function to be called with the `complete_reply` message
352 * as its only argument when it arrives.
354 353 * callbacks = {
355 354 * 'complete_reply': complete_reply_callback
356 355 * }
357 356 *
358 * The `complete_reply_callback` will be passed the content object of the
359 * `complete_reply` message documented
357 * `complete_reply` is documented
360 358 * [here](http://ipython.org/ipython-doc/dev/development/messaging.html#complete)
361 359 *
362 360 * @method complete
363 361 * @param line {integer}
364 362 * @param cursor_pos {integer}
365 * @param {dict} callbacks
366 * @param callbacks.complete_reply {function} `complete_reply_callback`
363 * @param callback {function}
367 364 *
368 365 */
369 Kernel.prototype.complete = function (line, cursor_pos, callbacks) {
370 callbacks = callbacks || {};
366 Kernel.prototype.complete = function (line, cursor_pos, callback) {
367 var callbacks;
368 if (callback) {
369 callbacks = { shell : { reply : callback } };
370 }
371 371 var content = {
372 372 text : '',
373 373 line : line,
General Comments 0
You need to be logged in to leave comments. Login now