加入收藏 | 设为首页 | 会员中心 | 我要投稿 核心网 (https://www.hxwgxz.com/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 创业 > 正文

关于ExtJS错误“例外被抛出且未被接

发布时间:2018-09-11 18:30:22 所属栏目:创业 来源:站长网
导读:最近在使用ExtJS搭建网页界面过程中报出错误消息,IE中的提示如下: 例外被抛出且未被接住,行19。。。。 Firefox 提示如下: uncaught exception: No center region defined in BorderLayout westpanel. 根据IE的错误信息调试了老半天也没找到哪的毛病,

  最近在使用ExtJS搭建网页界面过程中报出错误消息,IE中的提示如下:

  例外被抛出且未被接住,行19。。。。

  Firefox提示如下:

  uncaught exception: No center region defined in BorderLayout westpanel.

  根据IE的错误信息调试了老半天也没找到哪的毛病,本来就没多少的JS代码,硬是不知道问题出在哪。看了Firefox的提示才明白,意思就是说在layout为border的westpanel中没有定义center region。防止这样的报错就得把layout为border删了或者添加center region,显然如果这个panel没有子panel(items)的话完全没必要设成border layout。查了下ExtJS3.1.1 API documentation,关于border layout的提示有:

  1.Any container using the BorderLayout must have a child item with region:’center’. The child item in the center region will always be resized to fill the remaining space not used by the other regions in the layout.

  2.Any child items with a region of west or east must have width defined (an integer representing the number of pixels that the region should take up).

  3.Any child items with a region of north or south must have height defined.

  原来已经说得很清楚了,只是用得时候没注意啊。

  以后调试还是得多用Firefox的Firebug了。

(编辑:核心网)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    热点阅读