Hi Folks,

I'm trying to build a better mousetrap in a client-server environment  
that displays information in a set of listboxes.

I have three listboxes:

        lbJobDefinitions

        lbSystems

        lbFiles

The first contains a list of job definitions that each contain a list  
of systems and selected paths on the systems

        • The row listindexes in the first lb match the array positioning  
for the definitions.
        • The definitions contain a list of systems and paths that will be  
represented like this:

        "/My Solaris Server/usr/local/somedir"

        • The path is separated by the slash character and the first entry  
is the system name that will match the systems in the second lb.

The second contains the list of authorized systems (should match the  
contents of the various jobs in lbJobDefinitions)

The third is a filesystem hierarchical display for the selected system.

My goal is to synchronize the contents of the three listboxes using a  
combination of arrays (based on the first lb) and dictionaries that  
compare the third lb to the file selections contents (another array)  
based on the currently selected item in the second lb.  Therefore, if  
I select a job that has 3 systems with multiple paths selected, as I  
select each system in the second lb and expand its filesystem  
components in the third listbox, I want to update the hi-light for  
the entries in lb three to indicate a match to the filesystems in the  
job selected in the first lb.

If you're still with me, currently as I expand each element of the  
filesystem in lb three, I store the full shellpath for the displayed  
item in a hidden column in that new row.  This string value is what I  
compare against the members of the array for the selected system.   
This is where I believe that a dictionary will really speed things up  
since each system could have hundreds of filesystem selections.   
Currently, I'm comparing each row of the lb three as a new folder is  
expanded, but a for next comparison loop through ALL of the  
selections gets progressively worse the more comparisons that most be  
performed.  If I use a dictionary, the use of a construct such as:

        If d.HasKey(lbFiles.Cell(theRow, PathCol) Then
                // hi-light as a match in lb three
        End If

My current sticking point is how to maintain the dictionaries across  
multiple methods that are global in scope and not part of the  
listboxes' parent window's code scope.

I'm very open to thoughts and design guidance since I'm now going  
bald from my own hair pulling ...

Thanks for any thoughts,

Tim
--
Tim Jones
[EMAIL PROTECTED]

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to