0

I have been trying to choose a solution to store/restore some objects from files in my new Delphi project, and so far the most promising and more educative option I found was in a blocko blog post but he fails by not explaining how to Override GetChildren and override GetChildOwner which he claims is necessary for "objects that have sub-objects I want" and because:

otherwise all objects will be owned by the root component when they are read back in.

He is not responding to this post anymore so I ask for your help on how to complete this task by telling me how to proceed with this override task, because I do use objects with sub-objects (both from TComponent) which I want to save packaged.

Thanks!

enter image description here enter image description here

NaN
  • 8,596
  • 20
  • 79
  • 153
  • Can you provide some more information and code as to your application? The approach mentioned in that blog post is only one of many and still seems to be centred around objects of a component nature rather than business objects of the sort that would be used in an OPF like tiOPF, mORMot and Instant Objects. – Andy_D Jun 26 '14 at 14:34
  • @Andy_D Yes, Thanks! Those classes with <> are to be save. Note that they are in a tree. So I need to save them inside of another one. – NaN Jun 26 '14 at 14:43
  • I'm not sure about the quantities of objects that you will be storing, but even though the items may be displayed in a tree structure doesn't necessarily mean you have to store them like that in an "all-or-nothing" manner. You could store each class in a database table and use something like the Relationship Manager design pattern to tie them together. http://www.andypatterns.com/index.php/design_patterns/relationship_manager/ – Andy_D Jun 26 '14 at 14:56
  • http://stackoverflow.com/questions/2669947/why-the-composite-component-fails-to-parent-controls – Sir Rufo Jun 26 '14 at 20:24

0 Answers0