NetBeans Forums
| View previous topic :: View next topic |
| Author |
Message |
Mvek
Joined: 31 Oct 2011 Posts: 43 Location: Prague, Czech Republic
|
Posted: Fri Apr 06, 2012 6:02 pm Post subject: Bug? componentShowing() before componentOpened() |
|
|
Hi, can someone confirm, if it is bug? If I put a TopComponent into mode Explorer and then open from there new window via:
| Code: | DocEditTopComponent tc = new DocEditTopComponent();
tc.open();
tc.requestActive(); |
So without specifying the mode, then in the DocEditTopComponent class the method componentShowing() is called before the componentOpened().
If I moved the same opened window from explorer to editor mode and called this same action again, it worked correctly!
(NetBeans Platform Application, NB IDE 7.1.1) |
|
| Back to top |
|
 |
NeilCSmith
Joined: 08 Aug 2011 Posts: 19
|
Posted: Sat Apr 07, 2012 8:21 am Post subject: [platform-dev] Re: Bug? componentShowing() before componentOpened() |
|
|
Hi,
Not a bug, at least according to this page - http://wiki.netbeans.org/DevFaqAppLifecycleHooks
The order of the various hooks is not guaranteed or consistent. Personally, I wish it was, as it caused me a headache too!
Best wishes,
Neil
--
Neil C Smith
Artist : Technologist : Adviser
address-removed ([email]address-removed[/email])> wrote: | Quote: | Hi, can someone confirm, if it is bug? If I put a TopComponent into mode Explorer and then open from there new window via:
Code:
|
|
| Back to top |
|
 |
Mvek
Joined: 31 Oct 2011 Posts: 43 Location: Prague, Czech Republic
|
Posted: Tue Apr 10, 2012 7:16 pm Post subject: Re: [platform-dev] Re: Bug? componentShowing() before componentOpened() |
|
|
| NeilCSmith wrote: | Hi,
Not a bug, at least according to this page - http://wiki.netbeans.org/DevFaqAppLifecycleHooks
The order of the various hooks is not guaranteed or consistent. Personally, I wish it was, as it caused me a headache too!
Best wishes,
Neil
|
Thx, it is really "great"...
But ok, I don't need it, I just have a feeling, I had a problem with componentOpened when needed to get the active TC, which opened this TC. It at some point worked badly, so I moved it to componentActivated(), but then sometime get another problem and moved part back. And found this "problem".
Luckily it seems, returning all code to componentActivated() works well, so OK. |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You can attach files in this forum You can download files in this forum
|
|
|