My whiteboard has been indespensible in terms of keeping track of my extreme programming tasks.
And NUnit / NMock have been indespensible in terms of testing. I can re-test 80% of my code in under 2 minutes, including all those odd-ball special test
cases that a human is bound to forget.
Agile programming isn't the end-all / be-all, but it's been really helpful on my current project.
Discussions
-
-
Blkbam wrote:

object88 wrote: Tabbed browsing saves me untold amounts of screen clutter.
So does a second monitor.
You try to convince my boss that I need a second monitor, not to mention a second graphics card or a whole new one to support multiple monitors.
You try to convince my wife (or even me!) that it's better to spend $500+ on a second decent LCD-- there's no way or room to go back to a CRT-- when instead it could be spent on a vacation or other fun project.
Second monitor? Not gonna happen. Firefox / tabbed browsing? Been happening for a long time now.
-
Loadsgood wrote:"I want tabbed browsing. Waa waa waa!" Well put this up your pipe and smoke it. Now do you want tabbed browsing?
There are bugs in IE, but you still want to use it, right? A bug in something does not make me stop wanting it. Tabbed browsing saves me untold amounts of screen clutter.
-
Although with just plane "as", you still have to check for null. I'd like so see something like
with (CheckBox chk = o as CheckBox)
{
// body
}
where body is only executed if o is a CheckBox. This could be expanded out to...
with (CheckBox chk = o as CheckBox)
{
// body
}
else with (ToolBarButton tbb = o as ToolBarButton)
{
// other body
}
else
{
// another body
}
That would be useful to me, and quite compact. But I think "with" is a VB keyword, isn't it? -
Is this a glitch or am I doing something wrong?
I create a .NET ToolBar, and dock it on the right or left of some control. I fill it up with ToolBarButtons, some of which are seperators. Where there are seperators, there is a vertical line to the right of the icon, and one below. Although, this does not happen if the last button before a seperator is a dropdown button.
When the toolbar is docked on the top, I only get one seperator, as expected.
I haven't played with this much, so there is quite likely something I've missed. Thanks for any advice!
-
Thanks! A Microsoft guy on another site recommended that I call OnComponentChanging / OnComponentChanged directly, and that ended up taking care of the problem.
What will participating in a DesignerTransaction get me? I'm wondering if I should change my code to follow your suggestions.
Thanks again!!
-
OK, I've been coming up with a few more test scenarios.
In one, I have a simple string property on Foo, let's say, Foo.Number. When I go to the designer property page to edit it, I create a modal form with a text box and enter a new value. This works-- I can enter the new value, and the parent form page gets marked as changed, so I can hit Ctrl-S, and the changed value gets persisted out to the Windows Form Designer generated code.
In another, I have another simple string property on Foo, named DropNumber. I chose this name because when I edit the value in the designer, I have a dropdown with a textbox in it. This also works.
In a third, I have an object, FooOptionsDrop, which has an drop-down (textbox) editor that only manipulates one property on FooOptionsDrop (not on the actual Foo control). That does NOT work.
So, I'm drawing the conclusion that the problem lies with editting an object; no matter what kind of editor I use, the parent form fails to recognize that I've made a change. If the property in question is directly a part of the control, the changes are recognized.
Again, please, tell me why! What do I need to do so that the parent form recognizes changes to a control's property object? It looks like changes to the DynamicProperties on a form are recognized, but I can't find anything that talks about how it works (nor does it show up in Reflector).
Help!! -
Does using "as" not throw a cast exception if "o" is of the wrong type? Neat, I didn't know that... I always did soemthing like
if (o is CheckBox)
{
CheckBox chk = (CheckBox)chk;
// ...
} -
Perhaps there is some non-CheckBox control within pnlCheckboxes? Can you step through the code and manually validate that each item in pnlCheckboxes.Controls is a CheckBox? If not, the foreach will throw the error.