Bryan 的个人资料Bryan Hinton's space照片日志列表 工具 帮助

日志


2009/1/29

Sledding up Big Cottonwood Canyon

  On Martin Luther King Day we headed up the Canyon with our friends the Cardons to get some sledding in and get out of the nasty inversion that had settled into the valley.  It was a lot of fun and we found a really nice spot.  I thought I would share a video of Eliza speeding down the slope!

 
2009/1/12

Visual Studio 2008 SP1 WPF Designer crashing on XAML files from certain projects

  I know that is a pretty specific title, but after wrestling with this problem for the last couple of days (with a break in there for a very nice weekend!) I figured I would try to put something specific enough for Google to index it and so that some poor soul might benefit from my frustration.

  The WPF designer randomly crashing is not an uncommon thing – Google it and you will see that the solutions are hit and miss and somewhat black magic.  Things like – pin the toolbox when opening a file or create a new XAML file and that randomly fixes the old ones.  My is no less black magic as I have no clear explanation for it – but it worked for me.

  My issue was that XAML files in certain projects would load just fine, but in certain other projects Visual Studio would crash hard.  Finally I removed the Presentation.Core and Presentation.Framework from one of the two projects that were having this problem and added them back.  And Voila! problem fixed for not only that project, but also the other one as well.  I know – random and inexplicable – but thus is the Cider designer in 2008 SP1.  Hopefully this solves your WPF designer woes as well!

Technorati Tags: ,,,
2009/1/3

Christmas in Pictures

   We had a wonderful Christmas season.  We enjoyed all the sights and sounds of the season, time with family, decorating our house for the first time, a trip to AZ for Christmas in the desert, and all the things that go with this marvelous time of year. 

Festival of Trees with our friends the Cardons – a little bit of Grinch at Twilight

2008-12-04 Festival of Trees 006

2008-12-04 Festival of Trees 002

Our Annual outing to see the lights at Temple Square

 2008-12-05 Lights on Temple Square 011

The house decorated (not a great shot since it isn’t dark enough – I’ll have to try and take another one).  It was a chore to figure out how to decorate the house for the first time.  It came out okay though and should go faster and be easier next year (or so I tell myself)

2008-12-13 PlayingInTheSnow 003

 

Having fun in the snow!

2008-12-13 PlayingInTheSnow 001

Preschool Christmas party

 2008-12-17 SantaAtPreschool 012

Views of the Kaibab (first on the Fredonia side and then on the Marble Canyon side) from our trip down to AZ

Kaibab

On Kaibab looking out towards Marble Canyon

Our Polar Express Arrington Family Christmas Eve Party in Pajamas (we loved being able to come home and go right to sleep!)

  2008-12-24 Christmas Eve Party 001

 

 2008-12-21 Christmas Clothes 010 2008-12-21 Christmas Clothes 012

Surprise, Surprise – Look what Santa brought

 2008-12-25 Christmas Day 006

A collage chronicling our 2008

ChristmasCard

Hopefully everyone had a wonderful Christmas season and a Happy New Year – we are excited to see what 2009 brings!

2009/1/2

Zero Sum game for technology advancements or is it?

  My wife has been educating me lately on the evils of high fructose corn syrup and has made me aware of how pervasive that little devil on an ingredient is in the foods that I eat.  So much so that I found myself wondering when I am eating things, “Does this have high fructose corn syrup?”  And I am not kidding you when I say that I honestly ask myself that.  I just did that this morning as I ate cereal for breakfast.  Even the stuff that I considered good for me had high fructose corn syrup high on the list of ingredients. 

  That set me thinking - for all the science and technology advancements that we make do we offset them by other advancements or inventions that zero out the resulting gain?  For example dentistry has come along way from the pin them down and drill days, but we have added extra sugary sugar to everything that we eat and as a result are we any better off (now our mouths are filled with metal teeth instead of no teeth)?  Email, cell phones, and webcams have made staying connected with people so simple yet studies show that Americans are more alone today (have less close friends and family to rely on) than ever.  We have dishwashers, washers, dryers, robo vacs, non wrinkle clothes, and a thousand other conveniences to make life easier, but yet people are as stressed out and busy as ever (and perhaps even more so).  We have BlackBerrys and computers to make work easier, faster, and more convenient yet those have done much to make home an extension of work.  Medicine has made huge improvements in our knowledge on how to treat things, prevent things, and allow people to live longer lives yet Americans are fatter than ever before.  So in the end what is our true gain or is there one?

  Those were interesting things to consider this morning as I headed into work - all stemming from my wife’s commentary on high fructose corn syrup (not to be confused with normal corn syrup or brown sugar syrup which can also be found on your ingredient list).  Deep down I don’t think it is a zero sum game I think life is better off because of the advancements that have been made, but we are likely not as better off as people would have supposed.

 

.NET Framework Source Code to the Rescue

  On Tuesday I got a call up from a developer that was dealing with an unusual ASP.NET problem and was looking for some help.  I am not an expert with ASP.NET at all, but we booted up in a Shared View session to look at the problem (that had been stopping him for the better part of a day or two at that point).  He had sub-classed a dropdown list and was trying to use it in his site.  The new dropdown list had a read-only property added so that when set it would render as basically a label instead of as a dropdown list.  He had validated the behavior of the new control in a separate website but couldn’t get it to work in his website and he had borrowed the code along with some other code from another project that had done a similar thing within our company.  I didn’t realize the significance of that fact until later.

  We tried every little hack or nuance that I could think of and it got us nowhere.  The issue was clear the render method that had been overridden for the control was not getting called, but all the other overridden events were (like OnLoad, OnUnLoad, etc….).  Why was that happening that way?  We had another sub-classed control (a textbox) that was working correctly which made things even more confusing.  So as a last straw I figured we would plug into the new feature with Visual Studio that allows you to step into the .NET Framework code and see what is happening.  So we configured our machines using the following instructions/resources – the first link is the most update to date as VS2008 SP1 seems to have added greater support for this feature than which is was launched soon after VS2008 RTM.

  Then off we went – before long we were in the ASP.NET code watching as it enumerated the control list and called render on each one of the controls belonging to the page.  Surprisingly when we got to the control that was having the problem we saw that instead of calling into our render overload it was calling into a  DropDownListAdapter class that was a sub-class of a WebControlAdapter that was been injected into the process and was controlling the rendering of our control.  Now knowing where to look we found the adapter class as well as some entries into a ServerStateBrowser file registering the adapter to our custom DropDownList class.  This was code given to the developer by the other project.  That code was obviously doing things that the developer wasn’t expecting and didn’t understand (neither did I).  Obviously there is something to learn there about being wary about taking a lot of code that you probably don’t need and aren’t sure all it does.  But all is well that ends well (especially since both he and I wanted this resolved since the New Years holidays started the next day).  We could very well still be hunting without the wonderful new tool in the toolbox to reach into the Framework to see what is happening.  Next time I will break it out sooner rather than grappling in the dark for as long as we did!

 

Technorati Tags: ,