Advertisement

05.29.1999 at 02:46PM PDT, ID: 10166199
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

7.4

VB6: Handle events in a collection.

Asked by lankford in Visual Basic Programming, VB Objects

Tags:

Hello All,

I am implementing my own collection of nodes in a tree.  I have read the topic “Creating Your Own Collection Class: The House of Bricks” in the Visual Basic Programmer’s Guide.  I am using the ideas outlined in that chapter to implement my nodes collection.  I have two classes:

      Node
      Nodes

The node class instantiates the objects that contain all of the properties and functions for each node in the tree.  The nodes class is the collection class containing all of the nodes in a given tree.  

Some of the properties for each node object include things like Parent, Child, Next, and Previous.  In this way the structure of the entire tree is located in each of the node objects (they know where they are in the tree).  Because of this, I have to have one node defined as the First (or Root, or Ultimate Parent) Node in the tree.  The Nodes collection object has a property called “FirstNode” that returns a reference to the particular node that is actually the first node in the tree.  The node objects, however, don’t know if they are the first node or not – that information is simply not stored.  However, by definition, if a node has neither a Parent Node nor a Previous Node, it is the first Node in the tree.  Because of this I have added an event to the Node class that gets raised whenever the Parent or Previous properties are changed in such a way as to convert that node into a “First Node” (whenever both properties become Null).

Here is my question:  How do I catch this event from the Nodes collection class?  At some point I have to declare a Node object with events, but I am not sure how to capture that event from any of 100 or more node objects that are contained within a collection inside of the Nodes class.  Has anyone run across this type of situation before?  Am I simply overlooking the obvious?

Thanks,

Lankford

sorry for the length of the question.
Start Free Trial
[+][-]05.29.1999 at 04:05PM PDT, ID: 1514094

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 14-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.30.1999 at 01:21AM PDT, ID: 1514095

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 14-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.30.1999 at 06:17AM PDT, ID: 1514096

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 14-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.31.1999 at 01:34AM PDT, ID: 1514097

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 14-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.01.1999 at 07:23AM PDT, ID: 1514098

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 14-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06.01.1999 at 01:26PM PDT, ID: 1514099

View this solution now by starting your 14-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Visual Basic Programming, VB Objects
Tags: vb6
Sign Up Now!
Solution Provided By: Llandr
Participating Experts: 4
Solution Grade: A
 
 
 
Loading Advertisement...
20081112-EE-VQP-43