|
Well, the quotes make it hard to get to the indicated pointer, but other than that, it looks fine (assuming you're using MFC).
".45 ACP - because shooting twice is just silly" - JSOP, 2010 ----- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010 ----- "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass." - Dale Earnhardt, 1997
|
|
|
|
|
It is perfectly legit code, so the compiler was of no help at all...
It did look odd in the running dialog though!
Iain.
I am one of "those foreigners coming over here and stealing our jobs". Yay me!
|
|
|
|
|
Iain Clarke, Warrior Programmer wrote: "pSettings->sColName"
That's some funny stuff to deal with on a Monday morning!
So, you now have a button (or whatever cb is), that's labelled pSettings->sColName.
"Real men drive manual transmission" - Rajesh.
|
|
|
|
|
Contents of a combobox, but yes!
Well, not any more, I did fix it!
Iain.
I am one of "those foreigners coming over here and stealing our jobs". Yay me!
|
|
|
|
|
Iain Clarke, Warrior Programmer wrote: cb->SetWindowText ("pSettings->sColName");
Nothing's wrong with it. It compiles and executes without error.
If it fails to do wanted you wanted then that's not the computer's problem. Perhaps you should lower your expectations and try again.
Graham
Librarians rule, Ook!
|
|
|
|
|
It's a Monday. Expectations are already pretty low!
Iain.
I am one of "those foreigners coming over here and stealing our jobs". Yay me!
|
|
|
|
|
No error, "pSettings->sColName" is a quite descriptive text...
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Well, it might start confusing people if my code was in a loop...
You must love filling in forms with "Insert Name here"...
Iain.
I am one of "those foreigners coming over here and stealing our jobs". Yay me!
|
|
|
|
|
Ah, a common error. Let me fix it for you:
cb.Text = "pSettings->sColName";
/ravi
|
|
|
|
|
Hehe...
I am one of "those foreigners coming over here and stealing our jobs". Yay me!
|
|
|
|
|
The user should spot it quite quickly, in my opinion. The window/button/caption labeled "pSettings->sColName" is not intuitive in the UI...
|
|
|
|
|
I like to think I fix problems first!
I like to think...
Iain.
I am one of "those foreigners coming over here and stealing our jobs". Yay me!
|
|
|
|
|
It should have been:
#include "tchar.h"
...
cb->SetWindowText(_T("pSettings->sColName")); so that you could easily compile for either MBCS or UNICODE .
Software Zen: delete this;
|
|
|
|
|
"Bores long-off after catch, reverses and shoots?"(8)
Back to normal.
------------------------------------
I will never again mention that I was the poster of the One Millionth Lounge Post, nor that it was complete drivel. Dalek Dave
CCC Link[ ^]
Trolls[ ^]
|
|
|
|
|
Revolver
Graham
Librarians rule, Ook!
|
|
|
|
|
No, but I see how you are thinking.
------------------------------------
I will never again mention that I was the poster of the One Millionth Lounge Post, nor that it was complete drivel. Dalek Dave
CCC Link[ ^]
Trolls[ ^]
|
|
|
|
|
Dalek Dave wrote: but I see how you are thinking
Good, I'm glad one of us does!
Graham
Librarians rule, Ook!
|
|
|
|
|
TENDRILS
Bores - drills less 'l' is drils
Catch - net reversed - ten
Tendrils
It’s not because things are difficult that we do not dare, it’s because we do not dare that things are difficult. ~Seneca
|
|
|
|
|
Well done Annie, but well after the three hours allowed.
I will award a Judges Vote though.
------------------------------------
I will never again mention that I was the poster of the One Millionth Lounge Post, nor that it was complete drivel. Dalek Dave
CCC Link[ ^]
Trolls[ ^]
|
|
|
|
|
Thanks, as I don't start work until 12 - 1 so always miss out!
It’s not because things are difficult that we do not dare, it’s because we do not dare that things are difficult. ~Seneca
|
|
|
|
|
This article[^] does a good job dissecting the mangling, mauling and mutilation of contents on the path from paper to abstract to news bite.
I couldn't find a link to the original paper, though. Maybe it's actually about the bacon affinity of hamsters.
|
|
|
|
|
Interesting: I've always had my doubts as to the efficacy of TDD as opposed to write first/test after. That has always felt a more efficient use of time and resource especially in high throughput agile environments where the pressure is on to produce code and applications and where project managers have made delivery promises that the developers are hard pressed to keep.
"If you think it's expensive to hire a professional to do the job, wait until you hire an amateur." Red Adair.
nils illegitimus carborundum
me, me, me
|
|
|
|
|
I think the idea of test-first is exactly for that environment. When the pressure is to produce code and meet deliveries, if the testing is left until later, to often drops off as there's "more important" tasks at hand.
|
|
|
|
|
Rob Grainger wrote: When the pressure is to produce code and meet deliveries, if the testing is left until later, to often drops off as there's "more important" tasks at hand. As I was saying 40 years ago. (40 years! )
If people made the effort to read something three times before commenting, blogs would be much more useful places. - Anon.
|
|
|
|
|
I think it more appropriate to waterfall/strategic rather than agile/tactical projects. Mind you, I'm not advocating no testing at all! There is, of course, in progress testing which makes more sense to me as it becomes part of the development cycle rather than a separate process which may end up having little relevance as needs and time lines change.
"If you think it's expensive to hire a professional to do the job, wait until you hire an amateur." Red Adair.
nils illegitimus carborundum
me, me, me
|
|
|
|