So, in my attempts to get rid of the gaps in the DataGrids, QA discovered that when TrackAbout was installed on a Windows CE device (as opposed to Windows Mobile) the behavior was slightly different. First of all, with my initial changes, horizontal scrollbars always showed up. When going back and looking at older versions of TrackAbout, they often still appeared.
The big challenge in getting these issues fixed was that I did not have an actual Windows CE device. Actually, I don’t have any device, and do all of my development and debugging on either the device emulator or using our simulator. Our simulator is a regular windows program that displays the same screens that you see on the device, but it runs much faster. It’s a better way to quickly test things during development, even though the fidelity to the actual end-user experience is sometimes low. When we’re ready to hand off our code to QA, we make sure to test it in the device emulator, since it’s a much higher fidelity testing experience.
Unfortunately, in addition to not having a Windows CE device, I did not have a Windows CE device emulator image. I asked around of the devs on the team, and it turned out no one had an image. We all used Windows Mobile device images, which are pretty easy to get online. Some said it was impossible to get a Windows CE image.
But if I couldn’t get a Windows CE image then I only had two options. Either have a new device bought so I could more easily test and figure out what was going on. Or do the slow cycle that involved me making a change (through educated guesswork), handing off to QA, having them show me (via screen sharing) the results, and then making a new educated-guesswork change. Not fun. Not really even worth trying. So instead, I decided to do the “impossible” and find out how I could get a Windows CE device image.
And what I found out is that Microsoft does not make it easy to do. Neither do the device manufacturers. I figured I could find a download on the support page of one of the device manufacturers that would let me do the testing I wanted. But after much fruitless searching I gave up on that. I suppose I could have pushed harder by calling the support departments, but I was doing this in my free time. I also figured Microsoft would have a pack of different Windows CE emulator images that I could downlad. But no. They only make images for Windows Mobile/PocketPC available. It turns out that if you want a Windows CE emulator image, you have to make it yourself.
So here are the rough steps that I followed:
- Make sure you have Visual Studio 2005
- Download and install Windows CE
- Create a Windows CE project?
- Run Platform Builder from within Visual Studio 2005
- Choose an emulator image
- Choose a handheld device
- Add the features you need in your image
- Build the image
- Find where it got built
- Create a Device Emulator config file that points to the image
- Run it in the emulator
- Turn on DMA connections
I had to download the Windows CE trial edition so that I could create a Windows CE runtime. These are typically used to build images for actual hardware that manufacturers are testing before they release a new product. Windows CE has a “platform builder”, which is a plugin to Visual Studio 2005 (yes, 2005!), that makes it possible to create a Windows CE “platform” with certain features turned on or off. Once you have a platform defined, you can build an image. It took quite a few trial runs to get the image just made in a way that it could actually be used in the Device Emulator. Once there, it was very much a barebones install of Windows CE, and I got to track down odd tips like how to turn on DMA sync so ActiveSync would work, and how to get the .NET CF installed. But in the end, I had a working Windows CE emulator image running our software.
What is nice is that, once I had the emulator, it was simple work to figure out what the right metrics were to make the DataGrid gaps disappear. Since then, it also helped me track down another Windows CE-specific bug that cropped up.
