Re: AfxGetApp() returns NULL
- From: "Tom Serface" <tom.nospam@xxxxxxxxxxxxx>
- Date: Tue, 18 Dec 2007 10:41:49 -0800
Hi David,
I think that the style of formatting code is as subjective as anything can get in our business. I've worked with people that absolutely believe that God intended us to use the format:
if (...)
{
}
else
{
}
And I go to the church of more real estate and use:
if (...) {
}
else {
}
I also do this a lot:
if (...)
// One line of code
else
// One other line of code
I would put the else on the same line as the closing brace for the previous if, but that is *too* difficult to read. The thing I like the least is when people use this format:
if (...)
{
}
else
{
}
But, like I said, everyone has their preferences. Kind of makes you with K&R had imposed a format from the beginning. I've found that a good way to get to know code that I inherit is to reformat it. It makes me go through each line and think about all the blocks.
Tom
"David Ching" <dc@xxxxxxxxxxxxxxxxxxxxxx> wrote in message news:juT9j.11$pA7.5@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
"Joseph M. Newcomer" <newcomer@xxxxxxxxxxxx> wrote in message news:8evfm31u85r82m6gr6du6bh2fvb29jhkgq@xxxxxxxxxxI have always known it is there. I set it when I first install VS. I thought you were
referring to some new option that would do something intelligent, instead of the current
poor model.
Whatever. I thought you would understand what "Indent braces" means.
What is unreadable? And I disable the use of tabs; I always replace tabs with spaces,
since that is universal. I don't see a problem with indentation, because even when I use
VS to edit my code, it gets the identation right, following my indentation style.
What is non-standard is to use standard 4 spaces for levels of indentation but only indent 1 space after a brace. And using spaces instead of tabs is hardly universal. That's why every programmer's text editor has an OPTION of whether to use spaces or tabs.
I expect an editor to HELP me create code. This means that it has to be fully usable from
the keyboard without requiring function keys, arrow keys, or the mouse. This is one of
the most critical criteria. VS editor is not really usable in this fashion. It has to
get indentation right. It has to automate all the same things that my current editor
automates for me, which are considerable. Automatic flow and justification of comment
text, automated change log handling, ability to insert multiple characters quickly (if I
want to put 77 asterisks in, it is Ctrl+U 77 *), automating the block comments I use.
The capabilities of automating the VS editor are so poor that I can't even do the simplest
of my automation; worse still, the creators of VS think that there is no reason to allow
me to add automation to every possible keystroke, including printable characters; the key
bindings are limited to control keys, alt keys, and function keys, making it relatively
useless to me.
The failure is that MS thinks that editors are technologies. Editors are not
technologies, they are religions.
Yeah, we've been through this before too. I think we should stop because obviously you did not hear me the first (or second or third) time that you can write a VSTO plug-in that does have access to every possible keystroke. I think your goal is not to share pragmatic, time-saving solutions to existing solutions, it is to lecture on why the current solutions don't fit your idea of nirvana, no matter whether that nirvana is so far from normal as to be irrelevant to the rest of us.
-- David
.
- Follow-Ups:
- Re: AfxGetApp() returns NULL
- From: Joseph M . Newcomer
- Re: AfxGetApp() returns NULL
- From: David Ching
- Re: AfxGetApp() returns NULL
- References:
- 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
- From: David Ching
- Re: AfxGetApp() returns NULL
- From: Joseph M . Newcomer
- Re: AfxGetApp() returns NULL
- From: David Ching
- Re: AfxGetApp() returns NULL
- Prev by Date: More Colours for CFontDialog
- Next by Date: Re: More Colours for CFontDialog
- Previous by thread: Re: AfxGetApp() returns NULL
- Next by thread: Re: AfxGetApp() returns NULL
- Index(es):
Relevant Pages
|