简体   繁体   English

GWT-CSS GUI通知用户-浏览器问题

[英]GWT - CSS GUI Notify User - Browser Issues

wow I couldn't think of a decent title so I went for the acronym approach :-) 哇,我想不出像样的标题,所以我选择了首字母缩略词方法:-)

basically I'm working in GWT and I want to notify the user of a panel changing it's text. 基本上,我在GWT中工作,我想通知用户面板更改了它的文本。

I've done this by using a Timer() and CSS 我已经通过使用Timer()和CSS做到了

 public void flashObject() {
final Timer flashing = new Timer()
{
 public void run()
 {
  flashNewException();
 }
};
flashing.scheduleRepeating(rate);
new Timer()
{
 public void run()
 {
  if(stay){
   panel.addClass(CSS_HIGHLIGHT);
  } else {
   panel.removeClass(CSS_HIGHLIGHT);
  }
  flashing.cancel();
 }
}.schedule(length);

} }

private void flashNewException() {
 if(on){
      //   GWT.log("flashin");
         panel.addClass(CSS_HIGHLIGHT);
         on = false;
     } else {
     //   GWT.log("stop flashin");   
          panel.removeClass(CSS_HIGHLIGHT);
          on = true;
    }
   }

So this basically take's a panel add's and removes the CSS class allowing the panel to 'flash'. 因此,这基本上是添加面板并删除允许面板“刷新”的CSS类。

The trouble is if I run this in FF alongside the rest of my code FF will sometimes crash (I have another two timer's running elsewhere). 问题是如果我在FF中与其余代码一起运行,则FF有时会崩溃(我在其他地方正在运行另外两个计时器)。 I'm also running GWT-EXT. 我也在运行GWT-EXT。

I appreciate this may not be the crux of my problem but I'd like to ask, do you think this is the correct way to flash a panel in GWT / GWT-Ext? 我很欣赏这可能不是我问题的症结所在,但我想问一下,您认为这是在GWT / GWT-Ext中刷新面板的正确方法吗? How optimised is GWT to convert Timer's into javascript and how capable is FireFox at dealing with multiple Timers? GWT如何优化将Timer转换为javascript,以及FireFox处理多个Timer的能力如何?

As an extra point, if I kill 'plugin-container.exe' from my task list FireFox will recover... 另外,如果我从任务列表中杀死“ plugin-container.exe”,FireFox将恢复...

我将其视为可靠的编码,我相信我的GWT错误在其他地方

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM