Newbie data structure question (syntax to set this up)

  • Thread starter Thread starter confused_newbie
  • Start date Start date
C

confused_newbie

I've designed my app on paper, and I think I figured out how to structure my
data. Unfortunately, I'm a complete newbie and this goes a step further than
any of the books I have :-/ This is for a CF application, but the syntax is
VB so this seemed like the appropriate group to post to.

Any and all help appreciated:

Data structure is a 4x6 array of positions (like a small checker board) and
each position will have certain properties, like: Consumed (boolean),
ConsumedBy (object), StartOfObject (boolean), PositionAsStart (boolean). I
will create new instances of this structure to help me keep track of what is
going on in several tab controls (one instance of the structure for each tab
control). This structure will be updated at runtime either by the user, the
users actions, or from a configuration file (yet to be built)

Private Structure TabGridTracker
Public myPosition (,) 'each instance will be an array of 4x6, e.g.
Position(3,5)
Public myPosition(a,b).Consumed 'boolean
Public myPosition(a,b).ConsumedBy 'name of object (or control?) consuming
the position
etc.
End structure

Questions:
(1) If all of my "myPosition" arrays will be 4x6, can I declare it as part
of this structure (so they all start with a structure of 4x6 by default) or
do I have leave it open and declare the same size again and again with each
new instance of the TabGridTracker?
(2) For these "sub" properties, consumed, consumedby, etc- what is the
proper way to declare them, so I can use them? Each "cell" of the grid
(array) will have each of these properties.

Thanks!!
Keith
 
Back
Top