Select which dockables to persist, and persist to different files

Hi,

I’m developing an app using DF, in this app users can open projects, and projects can use several dockables. So (1) dockables from different projects should not to be combined and (2) when the user close the app the dockables must be saved (persisted) to different files, for example to: app.xml, project1.xml, project2.xml, etc.

Is there a way to accomplish this with DF? Any advise or guide will be appreciated.

Thank you!

:slight_smile:

Hm, not really. The layout (position, size, state, etc…) is one big blob of data that cannot be split into parts. Some of the layout-data is organized as tree, and splitting a tree into several trees - without loosing information - is tricky. That’s the reason why only one file for each layout is possible.

However, when loading such a file, the application can omit to show all Dockables. If you don’t provide a Dockable (or a factory like SingleCDockableFactory or MultipleCDockableFactory) to DockingFrames, then it cannot show the missing Dockables. Instead DockingFrames creates a “placeholder” (an Object that acts like an invisible Dockable) that can later be replaced by a real Dockable.

(P.S. I won’t be able to write a second answer before tomorrow)