gpt4 book ai didi

javascript - 在 extjs 4 中扩展消息框

转载 作者:行者123 更新时间:2023-11-30 06:32:49 24 4
gpt4 key购买 nike

我创建了一个扩展 ext.window.messagebox 的新 View 类但是当我尝试显示它时,它给了我一个错误:

Uncaught TypeError: Cannot call method 'setVisible' of null 

我的代码:

Ext.define('view.forms.MyBox', {
extend : 'Ext.window.MessageBox',
alias : 'widget.info',
xtype : 'forms-info',

resizable : false,
//closable : false --> removed
layout : 'vbox',
padding : 5,
width : 400,
height : 160,

showMessage: function() {

console.log('show message')

var me = this;

me.show({
title: 'Title foo!',
msg: 'test',
closable : false, // added here
icon: Ext.MessageBox.WARNING,
});
}
}); //eoc myBox

这可能是什么原因造成的?

最佳答案

问题是您拼错了“closeable”——您把它写成了“closable”。

编辑:抱歉 - 这是不正确的。我已经删除了示例。

关于javascript - 在 extjs 4 中扩展消息框,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16474617/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com