Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse 4 » Proper way to open window second time, after closing it once
Proper way to open window second time, after closing it once [message #1346183] Sat, 10 May 2014 13:35
Jeyhun MAMEDOV is currently offline Jeyhun MAMEDOVFriend
Messages: 21
Registered: March 2014
Junior Member
Hi I have problem with opening window second after closing it once

The code

EModelService mds
MApplication app

MTrimmedWindow wnd = (MTrimmedWindow)mds.find("", app);
if (wnd == null) return;

runs only once. after window has been closed, this code do not work.
my fix is to clone window and assign parent of main window where code
runs to cloned one.

EModelService mds
MApplication app
MWindow mainWind

MTrimmedWindow wnd = (MTrimmedWindow)mds.find("", app);
if (wnd == null) return;
MTrimmedWindow mtw = (MTrimmedWindow)mds.cloneElement(wnd, wind);

I seems to me that it is a hack, and I do not like it.
Is this a proper way? May be I should add something to onCloseHandler to
second window for to just hide it, not close (free).
Previous Topic:dynamic PopupMenu on Part
Next Topic:How to pass objects parameters from wizard to MPart?
Goto Forum:

Current Time: Tue Jun 22 21:36:19 GMT 2021

Powered by FUDForum. Page generated in 0.01715 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top