Thanks Norman,

Thanks for the reply and thanks for pointing out one more area I didn't know existed. Extends can be very useful but in this case I'm having a hard time seeing where there is an advantage to this over just writing my own from scratch. Seems to me the routine is the same, camping it on an RB existing method just seems a waste of time. Is there a difference between;

        c=f.VisibleCount  // Using Extends
        or
        c=GetVFCount (f) // Method to scan a folder & return visible items

Am I missing something vital with extends or is just to make the code pretty?

I took the second approach before the replies came in. It works for me, all 48 folders! - yeah, that's why I asked if there were any alternatives. Took me longer to change all the lines for .Count than it did to write the method to scan the folders.

Craig

Subject: Re: Getting accurate FolderItem counts...
From: Norman Palardy <[EMAIL PROTECTED]>
Date: Thu, 21 Sep 2006 20:17:30 -0600


On Sep 21, 2006, at 7:51 PM, Craig Hoyt wrote:

This is driving me insane! How do you all deal with those
damn .DS_Store files! Getting an accurate count using the 'Count'
property is invalid. You never know when a folder has one of these
files and when they don't. So short of writing my own routine to
walk through every folder to verify I get an accurate count, is
there some why I've overlooked to deal with this?

And for those who are about to hit that reply button to tell me
that it is returning the correct count, I know that. It's just that
including invisible files is only useful for cataloging or
directory searches. Most of the time we deal with the visible files
and it would be nice to have a simple way of getting a count on
only those. The worst part is you never know when one will appear.
Working code suddenly brakes, usually resulting in a out of bounds
error.

Craig

make an extends method that returns VisibleCount ?



_______________________________________________
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