应用程序在调试模式下正常工作,但在 Rally 环境中崩溃 [英] App works as desired in debug mode but crashes in Rally environment

查看:54
本文介绍了应用程序在调试模式下正常工作,但在 Rally 环境中崩溃的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建了一个动态创建网格的应用程序,并允许用户通过数字字段"编辑器对网格列之一进行更改.在调试环境中一切正常,但是当我尝试编辑 Rally 环境中的字段之一时,它会导致应用程序崩溃.从它的外观来看,包含应用程序的 iframe 只是完全重新加载.

I have created an app that creates a grid dynamically, as well as lets the user make changes to one of the grid columns via a 'numberfield' editor. Everything is working great in the debug environment but when I try to edit one of the fields in the Rally environment it crashes the app. From the looks of it, the iframe containing the app is just reloading altogether.

现在,这是一个奇怪的部分,可能是发生了什么的线索.在我点击应用程序的其他地方(提交更改)后应用程序崩溃,但如果我在应用程序的某个位置滚动鼠标滚轮,微调器会失去焦点(没有向上/向下箭头),然后然后如果我点击在某处应用了编辑并且应用程序不会崩溃.再次在调试模式下,我不需要经历这个,我只需点击其他地方即可应用更改.

Now, here's the weird part that may be a clue to what's going on. The app crashes after I click elsewhere on the app (committing the change) but if I scroll the mouse wheel somewhere on the app, the spinner loses focus (no up/down arrows) and then if I click somewhere the edits are applied and the app doesn't crash. Once again in the debug mode I don't need to go through this, I can just click elsewhere and the changes are applied.

推荐答案

这是 2.0p5 的一个已知问题,将在下一版本的 SDK 中修复.基本上它是使用大锤来响应某些内容被编辑并刷新它的事实.由于新的 SDK 可以与消息总线通信,因此完全没有必要...

This is a known issue with 2.0p5 that will be fixed with the next release of the SDK. Basically it's using a sledgehammer to respond to the fact that something was edited and refreshing it. Since the new SDK can communicate with the message bus this is totally unnecessary...

与此同时,您应该能够通过定义一个全局 Rally.getApp 函数来修补您的应用程序,该函数返回您的应用程序实例以防止硬刷新:

In the meantime you should be able to patch your app by defining a global Rally.getApp function that returns your app instance to prevent the hard refresh:

//In your app definition give it an xtype:
Ext.define('My.App', {
    extend: 'Rally.app.App',
    //...
    alias: 'widget.myapp'
    //...
});

//Find the app instance by its xtype and return it
Rally.getApp = function() {
    return Ext.ComponentQuery.query('myapp')[0];
};

您可以在 2.0p6 发布并升级后删除该代码.

You can then delete that code once 2.0p6 is released and you upgrade.

这篇关于应用程序在调试模式下正常工作,但在 Rally 环境中崩溃的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆