But the result is that the ouline that is showed then is not correct It is corrupted in a way that it does not show everything that should be in there.
I have some additional info on this problem. I am using the SWT client.
When setOutline(AccountsOutline.class) is triggered from my desktop class, it calls
AbstractDesktop.setOutline(IOutline outline).
When I step through this last method with the debugger () , and return to my application GUI after this method is finished, everything looks fine in the GUI. I can do this over and over again and everything works fine.
But when I don't have a breakpoint in this method and don't go through it step by step then my GUI is NOT OK. TablePages are not visible anymore. After it once has gone wrong the pages will not become correct anymore, only after a restart of the client application.
I tried to reproduce your described problem but I couldn't manage to do that. Could you provide us some more details e.g. which Eclipse Scout version and Operating System you were using, a code snippet with the your outlines and menus, etc.?
Attached you can find a sample project I created with the latest stable Eclipse Scout Juno Release [1]. The sample application consists of 2 outlines named Test1Outline and Test2Outline. The Desktop opens a TestOutlineTreeForm and the DesktopForm. Both outlines are displayed in the TestOutlineTreeForm. There are two menus under the ToolsMenu for switching between these two outlines. The menus simply call setOutline(TestXOutline.class). The TestOutlineTreeForm has a DesktopListener that install the tree when the outline gets changed.
Attached you can find a Zip file containing the same folder structure as your Scout application.
You can create a new Scout application, name it "test.app". Copy the files from the Zip file to your workspace where your application resides.
I created this example with the Scout template "Outline Tree and Table form" (New Scout project -> Scout Application Templates dialog) and added the a TestOutline and the menus to switch to this outline and to the StandardOutline. This seems to work fine on my machine.
Could you please provide us the source of your Desktop class and the sources of your outlines and menus?
I tested your example and it works fine, but this part works OK for my own project too.
The problem in my own project is that in the outline that is shown after the switch, the tablePages will not show up anymore.
When I start my application the first (BugsOutline) outline is shown and next to that, the first tablePage (BugsAndFeaturesTablePage) is shown.
If I then switch to another outline, the tablePage in the second outline is gone, and if I switch back to the first outline then there the tablePage is also gone.
I've found out that the outline switch problem does not appear when using Eclipse 3.7 Indigo with the latest Scout version 3.8.201206130843 [1].
That's why I think that the potential multi-threading issue not directly related to Scout but in the underlying SWT library code of Eclipse 3.8 Juno. I will post further findings and analysis at [2].
Could you try to use Eclipse Scout 3.7 and update to version 3.8 as described in [3]? Does the same problem happen again?
installed a Eclipse Scout Indigo IDE. Created a project with two outlines. Then updated only the Eclipse Scout parts to 3.8 but that does not work. I get all kind of eclipse errors.
If I update everything I get of course a complete Juno version.
I also noticed that in Scout Juno SWT client I do not get the Outline View Buttons in the toolbar.
Because this has changed with Eclipse E4 it is highly possible that the method described there do not work any longer. (Eclipse Scout Juno release = Eclipse 4.2 + Scout 3.8 )
Bertin Kiekebosch wrote on Thu, 23 August 2012 05:24
installed a Eclipse Scout Indigo IDE. Created a project with two outlines. Then updated only the Eclipse Scout parts to 3.8 but that does not work. I get all kind of eclipse errors.
Hi Bertin,
You should do the steps the other way round, i.e. install Scout 3.8 by using the Juno update site and then create a new Scout project.
Otherwise, your Scout project is created with a code base of Scout 3.7 which probably needs some modifications.
However, if you install Scout 3.8 first, the generated project is based on Scout 3.8 and you should be able to start it without any problems.