PDA

View Full Version : [CLOSED] Info message not shown



staffan
1 Apr 2009, 3:43 AM
If you make two com.extjs.gxt.ui.client.widget.Info messages, the first by calling:



new Info().show(conf);


and second by calling



Info.display(conf);


(Were conf is a InfoConfig parameter object)

Then the last message will never be shown. If you call the last message one more time, it will however be shown.

This is gxt 1.1.3

sven
1 Apr 2009, 3:47 AM
First approach is wrong. Second approach is the way to go. Closed

staffan
1 Apr 2009, 3:58 AM
But I need to be able to explicty close the Info when I want rather then wait for the time specified in InfoConfig.display. The only way I figured I do this is be calling .hide() on the Info-message instance. In order to get a reference to the instance I need to make the call like the first example. Or is there an other way?

A possibility is to change all my other calls (which are like the second approach) to be like the first one. Ok, or bad idea?

The


Info.display(conf);

"returns" void, so I don't see a way using that and still be able to call hide()

sven
1 Apr 2009, 4:00 AM
If you want to close it than you also need to position it correctly. As the Info isnt on the stack if you show it with


new Info().show(conf);

It gets position not in the correct order. It is shown, but not where you expect it.

staffan
1 Apr 2009, 4:27 AM
The strange thing is that it isn't the new Info().show() that disapears, it's the other Info.display() that is not showing..

According to your explination it would be the other way around, no?

sven
1 Apr 2009, 4:32 AM
Well i just tested your code with 1.2.3 and it looks like the behaviour was already fixed. So also self create Infos get on the stack.