On Sep 30, 2006, at 15:12 UTC, Phil M wrote:

> Actually, I have it working without a wrapper object.  I posted this  
> technique earlier, but I provide a little more detail here.

Yes, something like this is what I usually do too.  However, a minor
performance nitpick: when building the array of sort keys...

>      Dim v() As String
>      Dim k, nilCount As Integer
>      Do Until (k > UBound(f))
>        If (f(k) Is Nil) Then
>          f.Remove(k)
>          nilCount = nilCount + 1
>        Else
>          v.Append(f(k).Name)     // get the property value here
>          k = k + 1
>        End If
>      Loop

It'd be simpler and faster to preallocate the array, leave nil objects
in the original, and just treat these as if they have some value (for
strings, the empty-string would be a sensible choice IMHO).  So I would
do:

  Dim v() As String
  Redim v( UBound(f) )
  for k As Integer = 0 to UBound(f)
    v(k) = f(k).Name
  next

My $0.02 anyway,
- Joe

--
Joe Strout -- [EMAIL PROTECTED]
Verified Express, LLC     "Making the Internet a Better Place"
http://www.verex.com/

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

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to