Hello all. I'm trying to finish up the last finishing touches on this project i've been working on. I'm reworking my file saving method to use a binary method of saving rather than simply serializing my class as I was doing before.
My problem comes in when I get into the more complex areas of my class. Up until this point i'm basically using a FileStream to create a file for saving to, and then saving out all of the info in my class by looping through all the objects that have my class type in the app. So far it's been pretty easy b/c i've only been saving integers and strings.
To begin let me explain my basic class structure for the app:
I won't trouble you with the full source, b/c i don't think its necessary. Just so you understand the hierarchy, i'm trying now to save a FieldNode, that is i'm trying to save:Code:Namespace Crystal Enum ColumnType Enum PriorityType Public Class Design Public Class Field Property Columns as ArrayList Property Name as String Property Nodes as ArrayList Public Class FieldCollection Inherits CollectionBase Public Class FieldColumn Public Class FieldNode Property FieldParent as Field Property ListItemInfo as ListViewItem Property CategoryList as String Property Notes as String Property Images as ArrayList Public Class FieldNodeCollection Inherits CollectionBase Public Class Category Public Class CategoryCollection Inherits CollectionBase Public Class Image End Namespace
FieldCollection-->Field-->FieldNodeCollection-->FieldNode
I'm not sure whether or not I should save the actual full FieldParent field that the first property is referring to within my FieldNode, or whether I should some how save a type of reference to the Field it refers to in the program. The latter seems improbable to me since VB doesn't seem to use pointers as a language like c++ would. Does anyone have any ideas how I could save a parent property that is meant to reference a Field object inside of a FieldNode in my app?
Thanks in advance.




Reply With Quote