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