Re: AfxGetApp() returns NULL



see below...
On Tue, 18 Dec 2007 10:41:49 -0800, "Tom Serface" <tom.nospam@xxxxxxxxxxxxx> wrote:

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.
****
I spend three days when I get a new project reformatting the code. And I do it for
exactly the same reason: I get to read the entire program, and when I'm done, I have a
really good idea of the structure. I can handle about 100K lines in that time.
joe
****

Tom

"David Ching" <dc@xxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:juT9j.11$pA7.5@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
"Joseph M. Newcomer" <newcomer@xxxxxxxxxxxx> wrote in message
news:8evfm31u85r82m6gr6du6bh2fvb29jhkgq@xxxxxxxxxx
I 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


Joseph M. Newcomer [MVP]
email: newcomer@xxxxxxxxxxxx
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
.



Relevant Pages

  • Re: AfxGetApp() returns NULL
    ... I've worked with people that absolutely believe that God intended us to use the format: ... That's why every programmer's text editor has an OPTION of whether to use spaces or tabs. ... the keyboard without requiring function keys, arrow keys, or the mouse. ... The capabilities of automating the VS editor are so poor that I can't even do the simplest ...
    (microsoft.public.vc.mfc)
  • Re: AfxGetApp() returns NULL
    ... VS to edit my code, it gets the identation right, following my indentation ... the keyboard without requiring function keys, arrow keys, or the mouse. ... VS editor is not really usable in this ... of my automation; worse still, the creators of VS think that there is no ...
    (microsoft.public.vc.mfc)
  • Re: AfxGetApp() returns NULL
    ... VS to edit my code, it gets the identation right, following my indentation ... OPTION of whether to use spaces or tabs. ... me, and written using my editor, and given away free to others as a courtesy, I see no ... of my automation; worse still, the creators of VS think that there is no ...
    (microsoft.public.vc.mfc)
  • Re: Macro to Alter Table Field Names
    ... By "automation" I meant code which imports directly from (specific format) flat files (usually tab, comma or semi-colon separated), may also involve some integrity checks in the process... ... Incidentally, I was wondering the remark about automation, I think I could ...
    (microsoft.public.access.tablesdbdesign)
  • Document_Close event / Document.Saved flag
    ... We have an application which uses Word through Automation as a text ... editor. ... The application is used with Word97, ... We are currently testng to release it for Word2003. ...
    (microsoft.public.word.vba.general)

Loading