Friday, January 22, 2010

Detecting Design Mode In Visual Studio

If you are using a control or component in Visual Studio in design mode, and if in that component, there is code which attempts to access a database, you will encounter an error when trying to view it, and you will be unable to access the design mode view.

The solution is to check for design mode. For example:

if(this.Site.DesignMode){
     // do stuff here, but don't do a db connection
}
else{
     // do your db stuff here
}

BUT the problem here is that DesignMode shouldn't be used in a constructor. It won't work. A great solution therefore is:

if(System.ComponentModel.LicenseManager.UsageMode == System.ComponentModel.LicenseUsageMode.Designtime){
     // now you've detected DesignMode and it works if the check is even in a Constructor!
}
else{
     // you can do your db stuff here
}


Wednesday, January 13, 2010

Particle Toy Available On App Store



Particle Toy is a particle system "sandbox" toy! Play with the color, speed, size, gravity, wind, and direction of a particle system right on your iPhone or iPod touch!


Enable tilt-controlled positioning and real-gravity to move the particle set around the screen or affect gravity by the tilting and orientation of your device.


Your particle system is automatically saved upon exit. Resume where you left off at any time, or start again from scratch with a default particle system by shaking the device.




Firepower at Apple Store in Scottsdale

Tonight I stopped by the Apple Store, Scottsdale Quarter, to demo Firepower along with other developers of the Phoenix iPhone Developer Group.

I still have a lot in store for firepower, and am excited to see people's reaction, but even in its current phase, it still generates a pretty exciting reaction when showing to a group.

I am dismayed by the lack of readily available hassle-free demo technology at the Apple Stores. This is the second app demo night I've been to, and each time, the setup includes a video camera set in a tripod standing over your iPhone. Imagine struggling to mess with a live camera, tangles of cords, and run your own iPhone app, while orienting the iPhone properly under the tripod, and controlling everything without getting your fat hands in the way of the camera lens, all while trying to speak to an audience and assemble coherent speech. Obviously, there's a much better way. Apparently, it just isn't readily available at Apple Stores yet. It would have also been nice to have the large flat panel Genius displays above the Genius bar showing the camera feed, but they were not available to us.

Overall, the event was positive for me, because people seemed to really get a kick out of Firepower. I also demoed Particle Toy. I didn't have fully implemented the feature for exporting a Particle Set from Particle Toy to Firepower, so I just had to talk to it and promise it would be cool.