Re: AfxGetApp() returns NULL
- From: "David Ching" <dc@xxxxxxxxxxxxxxxxxxxxxx>
- Date: Sun, 16 Dec 2007 23:05:18 GMT
"Joseph M. Newcomer" <newcomer@xxxxxxxxxxxx> wrote in message
news:226bm31cgl0oj38k5amk6vsjkamvd2cltq@xxxxxxxxxx
But I rarely need to find "all calls" to public methods, because the
public methods are
used in very few places. For example, the public methods of a CDocument
class are
typically only used by the CView, and a simple search will find those; no
sophisticated
browsing information is required. There might be classes that are shared
between a CView
and a CDocument derivation, but in that case, I still can find them all
quickly. By not
tossing tons of public methods in to generic classes like my
CWinApp-derived class, there
is no question of needing to find all of them; they exist only in the
modules that can
name the class, and there are very few of those.
It certainly helps to limit the files that could possibly access a public
method, but still your search process is 2 steps: find the .cpp files which
#include the header for the class in question; and grep those files for the
method, which still could be called i() in which case the chances of false
positives is rather high. Still, I can see how you could limp along with
this method if there were nothing better, but the fact is there are tools an
order of magnitude better than this.
When I get programs that have been badly written, then a browser is
useful. But I don't
need one for my own code, because I don't write things that require fully
general browsers
to find them. By limiting scope and visibility, I usually can quickly
find what I need.
Having a decent "grep" instead of the abomination of Find In Files that VS
supplies is
also a great help! (There are so many things wrong with Find In Files
that I deem it a
useless misfeature. The simplest ones, that it replaces the contents of
the find window,
and that you cannot delete lines from the find window individually,
already makes it so
unusable that the rest of the superficial flaws become irrelevant)
Well, these things don't bother me at all. Find in files works great. What
exactly do you want to preserve in the Find window that you are so upset
about it replacing? And why would you want to delete lines from the search
results? I just press F4 to step through them and that's it.
-- David
.
- Follow-Ups:
- Re: AfxGetApp() returns NULL
- From: Joseph M . Newcomer
- Re: AfxGetApp() returns NULL
- References:
- Re: AfxGetApp() returns NULL
- From: David Wilkinson
- Re: AfxGetApp() returns NULL
- From: David Ching
- Re: AfxGetApp() returns NULL
- From: Joseph M . Newcomer
- Re: AfxGetApp() returns NULL
- From: David Ching
- Re: AfxGetApp() returns NULL
- From: Joseph M . Newcomer
- Re: AfxGetApp() returns NULL
- From: David Ching
- Re: AfxGetApp() returns NULL
- From: Joseph M . Newcomer
- Re: AfxGetApp() returns NULL
- From: David Ching
- Re: AfxGetApp() returns NULL
- From: Joseph M . Newcomer
- Re: AfxGetApp() returns NULL
- From: David Ching
- Re: AfxGetApp() returns NULL
- From: Joseph M . Newcomer
- Re: AfxGetApp() returns NULL
- Prev by Date: New essays: MSDN bugs, UTF-8
- Next by Date: Re: CDC::SelectObject failure reason
- Previous by thread: Re: AfxGetApp() returns NULL
- Next by thread: Re: AfxGetApp() returns NULL
- Index(es):
Loading