Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Persistence with MissingCDockableStrategy.STORE #65

Closed
devmagix opened this issue Aug 21, 2018 · 6 comments
Closed

Persistence with MissingCDockableStrategy.STORE #65

devmagix opened this issue Aug 21, 2018 · 6 comments
Assignees

Comments

@devmagix
Copy link

I'm having an issue with persistence. It is similar to issue 28 but is not quite the same. In my application, I need to add MultipleCDockableFactories after loading the persistence file with CControl.readXML. The CControl.setMissingStrategy is set to MissingCDockableStrategy.STORE, so that the factories will effectively be called when added if matching dockables have been loaded previously.
It works... except when docks are stacked into tabs. One of the tabbed docks, when reloading, is made invisible by the framework (i.e. not available in the docks list menu) but its content stays in the working area, which is weird because it cannot be closed. It is fixed if configuration is reloaded afterwards, but unfortunately this is not an option in my case.

I don't know if what I write makes any sense :) so I reproduced the issue with the paint demo. See attached modified sources. Tested with 1.1.2-P20b.
ViewManager.java.txt
Core.java.txt
Try to create 3 editor tabs, close, restart: one of the 3 tabs is not closeable and not available in the View menu.

So my question is: is this a bug, or adding factories after loading configuration is not supposed to be supported? Thanks.

(Note: Thanks for this framework, I love it!)

@Benoker
Copy link
Owner

Benoker commented Aug 21, 2018

I'll try out your demo (maybe not before the weekend). In theory what you are doing should be possible, but you are scratching the limits. I'll report back when I know more (most certainly not before the weekend).

@Benoker
Copy link
Owner

Benoker commented Aug 25, 2018

I found part of the solution. There is a piece of code that cleans up old layout information, that piece of code cleans up too much. It did throw away the "stack". Making it more intelligent did help a bit, but the layout is still not loaded properly. I'll keep investigating.

@Benoker
Copy link
Owner

Benoker commented Aug 25, 2018

Also fixed a second bug where the newly created Dockables were not registered properly (and thus did not have any buttons).

I'll commit, push and upload 1.1.2p20c later today

@Benoker Benoker self-assigned this Aug 25, 2018
@devmagix
Copy link
Author

devmagix commented Aug 25, 2018 via email

@devmagix
Copy link
Author

Just tested the new version, I confirm it works for me now.
Thanks again!

@Benoker
Copy link
Owner

Benoker commented Aug 27, 2018

Thank you. Let me know if you have any other issues.

@Benoker Benoker closed this as completed Aug 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants