mirror of
https://github.com/jupyter/notebook.git
synced 2025-01-30 12:11:32 +08:00
handle null objectname on tooltip
This commit is contained in:
parent
e380aba1e0
commit
bc5aeebd11
@ -171,12 +171,16 @@ var IPython = (function (IPython) {
|
||||
};
|
||||
|
||||
Kernel.prototype.object_info_request = function (objname) {
|
||||
var content = {
|
||||
oname : objname.toString(),
|
||||
};
|
||||
var msg = this.get_msg("object_info_request", content);
|
||||
this.shell_channel.send(JSON.stringify(msg));
|
||||
return msg.header.msg_id;
|
||||
if(typeof(objname)!=null)
|
||||
{
|
||||
var content = {
|
||||
oname : objname.toString(),
|
||||
};
|
||||
var msg = this.get_msg("object_info_request", content);
|
||||
this.shell_channel.send(JSON.stringify(msg));
|
||||
return msg.header.msg_id;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
Kernel.prototype.execute = function (code) {
|
||||
|
@ -739,7 +739,6 @@ var IPython = (function (IPython) {
|
||||
|
||||
Notebook.prototype.handle_payload = function (cell, payload) {
|
||||
var l = payload.length;
|
||||
console.log(payload);
|
||||
for (var i=0; i<l; i++) {
|
||||
if (payload[i].source === 'IPython.zmq.page.page') {
|
||||
if (payload[i].text.trim() !== '') {
|
||||
@ -919,7 +918,9 @@ var IPython = (function (IPython) {
|
||||
func = func.replace(endBracket,"");
|
||||
var re = /[a-zA-Z._]+$/g;
|
||||
var msg_id = this.kernel.object_info_request(re.exec(func));
|
||||
this.msg_cell_map[msg_id] = cell.cell_id;
|
||||
if(typeof(msg_id)!='undefined'){
|
||||
this.msg_cell_map[msg_id] = cell.cell_id;
|
||||
}
|
||||
};
|
||||
|
||||
Notebook.prototype.complete_cell = function (cell, line, cursor_pos) {
|
||||
|
Loading…
Reference in New Issue
Block a user