Problem with the method invocation order within a view. [message #134557] |
Tue, 23 September 2003 13:02 |
Eclipse User |
|
|
|
Originally posted by: jmordax.terra.es
Hi, I have found a problem with method invocation order within a View.
I have a plugin which add a custom View. As all Views it extends
ViewSite so it implements:
- createPartControl(). Where I create all the components and layouts.
- setFocus(). Where I put the focus on a component created before
(within createPartControl).
When the view is launched, the platform invokes createPartControl and
later setFocus. So everything work fine.
But, imagine a have my View opened. Then I change to another View
(pressing its tab) so my view is hidden. Now I close Eclipse. Then a
restart Eclipse. The perspective has the same configuration that existed
when I closed Eclipse (this means my View is hidden). Then, I show my
View (pressing its tab) and...... crash! NullPointerException.
It seems it has not invoked createPartControl yet. And it invokes
setFocus before, which referes to instances that should have been
created within createPartControl.
Has anybody seen this problem? Is it a bug? Or, am I doing any wrong
assumption?
Thanks in advance,
Chemi.
|
|
|
Powered by
FUDForum. Page generated in 0.25297 seconds