A place to keep my thoughts on programming

Monthly Archives: February 2007

Discoverable RangeValidation (revisited)

The RangeValidation code I created turned out to be of limited usefulness because Attributes are pretty picky about what they can take as arguments. This meant that I couldn’t even create the decimal version, which was the original motivator. Revisiting … Continue reading

February 11, 2007 .net

Discoverable RangeValidation

One aspect of writing code that has always bothered me is how to communicate legal values. Sure, if the type that a Property accepts is of your own making then the onus is on the one who created the instance … Continue reading

February 10, 2007 .net

WM5 Multiline Textbox draw bug Hack

I know I’m not the only .NET developer for Smartphone. But it sure seemed that way when I tried to find a solution for a .NETCF 1.0 bug with multiline textboxes, hardly an uncommon Control, IMHO. After trying a number … Continue reading

February 7, 2007 .net , , , ,

Smartphone, wake up behavior

I’ve been doing quite a bit of work with the HTC Dash Smartphone. One thing all smartphones (and all phones really) is to go to sleep quickly to save battery. Well, on the Dash, when you push any button, it … Continue reading

February 6, 2007 .net, geek ,

State-aware programming in C#, part III

Now that we have a syntax for defining state aware objects, we need the code that wires these things up for us automatically. This consists of the following: StateMethod Attribute StateMethodHandler Attribute AStateObject base class to wire up our methods … Continue reading

February 2, 2007 .net, geek

State-aware programming in C#, part II

Having defined the approach for the stateful framework, let’s tackle the design goals: Serializable state-aware objects Different logic paths per state on state aware methods State specific methods should be inherited Default and state specific methods Type-safe states Ideally we … Continue reading

February 1, 2007 .net, geek

State-aware programming in C#, part I

This is going to be a multi-parter, simply to allow for some organizing and avoid the giant scrolling page. State as language syntax One thing I’ve always liked about UnrealScript was its inclusion of states as a first class citizen … Continue reading

.net, geek