I do this steps:
I have an application with a lot of Asych RCP connections on my app.
1. I initialize Tabpanel and I try to add a Panel to Tabpanel
public void addToApplication(String name, Panel p) {
                screens.put(name, p);
                synchronized (centerPanel) {
                        centerPanel.add(p, p.getTitle()); //here execution 
stops - step 3.
                        int index = centerPanel.getWidgetIndex(p);
                        if (index >= 0) {
                                centerPanel.selectTab(index); //step 4.
                        }
                }
}
2. Second response from server is an error, so I deleting all info
from browser (it means all panels from tabpanel) and showing error
message.
synchronized (centerPanel) {
                                this.centerPanel.clear();
}

3. When second response arrived, execution of addToApplication()
method is stopped (is on FF3 only one thread for JS, isn't?)

4. When JS responsible for showing error message is finish flow back
to step 1 and trying to execute next line in this code: int index =
centerPanel.getWidgetIndex(p); and then index = 0, next line:
centerPanel.selectTab(index); So what??

Ok, what is strange:
I guess I finish with executing a method addToApplication in step1.
but is not, there is still some values and p variable is still setted.
When comes to line: int index = centerPanel.getWidgetIndex(p); index =
0, not -1!!! like it should be... I getting IndexOutOfBounds...

General, people says that truth is in code, but now I am lost...
Please help a little!

Greetings,
Michal

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to