For Programmers: Free Programming Magazines  


Home > Archive > Visual Basic > March 2004 > OO Question









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author OO Question
U-CDK_CHARLES\\Charles

2004-03-30, 3:30 pm

List:

I'm creating a system where a parent document "has a" aggregate data
struture containing individual line items.

The individual line items have a state (Open, Cancelled, Approved). The
parent document ALSO has a state.

I would like to set things up so that whenever the parent document
changes its state, it changes the state of all the line items. This
appears to be simple.

But I'd ALSO like to set things up so that when the line items change,
the parent checks its OWN status, probably via a callback mechanism.

My thought is that the line items should hold a reference to the parent
document. However, I'm not quite certain how this can be done.

The other alternative is to enforce the idea that lines are ALWAYS
accessed via the parent document, but that winds up coupling the parent
document to the line items, which isn't, imo, the best alternative.

What's the BEST way to do such a thing in VB 6.0? I'm running SP5.

Thanx


Charles


Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com