Insight into Visual C++ for Devices: Design philosophies

Now with 30% more intangibles! Like every other product out there, we need to balance ease of use and power. Sometimes there were easy decisions that resulted in both ease of use and power. On the tough ones, sometimes we succeeded, and sometimes we... were less than totally successful in coming up with designs that were easy and powerful. In the cases where we couldn't come up with a reasonable balance between power and ease of use, we erred on the side of letting users have more power. This design philosophy actually matches up generally with the desktop VC philosophy (as far as I know anyway :)). We've definitely experienced pain because of this, an easy way to shoot yourself in the foot (please don't do this to a project you care about) is to open the project properties, and select all configuration and all platforms from the two dropdowns at the top of the dialog. Now, if you navigate to the preprocessor definitions property, you'll notice that it's now blanked out. You can probably guess that this is because the definitions don't match between configurations, and you're right. Can you guess what happens if you type anything in the now blank box? That's right, it overwrites all of your previous settings with whatever you just put in that line. Wait, that wasn't what you were expecting? You thought that it might append the new text onto the old? So would I, except that I know how hard this problem is to solve, and I happen to have had to debug this. This is actually a problem in any property that allows the user to type multiple values. We (both VCD and VC) didn't have the time to solve this problem for the VS2005 release, so we erred on the side of allowing you to shoot yourself in the foot, and giving you the power to change all settings rather than blocking this type of change entirely (which would have resulted in less functionality). Remember, when you find a bug in the product, odds are it's a powerful bug! Given lots of time to fix this issue, I would probably redesign the UI so that when you were editing a property for multiple configurations, you were basically given a tree view of where all the definitions were coming from, and you could append in that hierarchy. Leaving this specific example behind, when you come across oddities in the way the product works, many times it was because we couldn't come up with a way of making everyone happy, and we chose to err on the side of allowing users to do things that we didn't necessarily anticipate.

Bonus device toolbar factoid: The device toolbar was originally designed to work with only the managed project systems (VB.NET, C#), so it was originally targeted at a user that might not be as sophisticated, and that might be puzzled when confronted with a list of 500 devices to choose from to deploy. For this reason, the device toolbar limits its display to devices matching the current platform for the project. Now I know what you're saying, VCD allows multiple platforms per project, how do you work around this? Well, we actually register each project multiple times, once for each configuration, each with its own device. Because the device deployment tool property page allows you to change to any deployment device, you can actually set the deployment device for a Pocket PC 2003 project to be a Smartphone 2003 device, and lo and behold, the device toolbar will now only show Smartphone 2003 devices. Fun, isn't it?

Another bonus device toolbar factoid: If you click and hold Ctrl to select multiple projects at the same time, you can actually change the deployment device for all of them at once (in most cases). If the projects have the same deployment device, the deployment toolbar will still display the deployment device for both projects. If the projects have the same deployment device platform (e.g. Pocket PC 2003) but are set to different devices (Device and Emulator for instance), then the device toolbar will be blanked out, but if you click the dropdown, you'll be presented with a list of all the devices for the platform. If the projects have different platforms, then you won't be able to multi-select them and use the device toolbar to change the deployment device, as the device toolbar will be greyed out.

Next up, multiple platform support and the terrible deployment tool additional files syntax.

Comments (1)

  1. Riki says:

    ahh-ha! so your to blame for that Evil preprocessor box. Thats caught me out more than once.

    You will pay…



Skip to main content