Archive for June, 2010

I’m currently using visual studio 2008 unit testing to develop a class library, and into the library I put one of my classes that calls a web service. So I added a service reference to the class library.

But when I tried to test something that intantated the web service client, I kept getting weird errors as I ran the unit test.

It turns out that when I copied the app.config from the class library that included the web service definitions into the app.config of the unit testing project, the error went away. I’m not sure why the debugging project needs to have the service definitions.

Somehow it feels like the linq to sql class should inform the listbox that it needs to refresh and there should be some magic setting, but for the time being:
XAML extract:
set the datasource in the window:
<Window x:Class="HomerV3_Queries.Window_Queries"
DataContext="{Binding RelativeSource={RelativeSource Self}}"
bind to it at the listbox. "Queries" is the table I'm binding to.:
ItemsSource="{Binding Path=Queries,UpdateSourceTrigger=PropertyChanged}"

C# code called after every database change – note the commented out stuff that does not work:

why should I feel such a sense of triumph at finally getting this to work on my windows 7 laptop? Probably I had made some mistakes along the way – notably when I installed sql server enterprise on top of developer, and then applied the wrong file for the service pack 1 for about a week.

I think it was a little weird that installing the identity framework did not work, but installing Geneva did (I had never previously installed Geneva, so perhaps the identity service pack wasn’t doing anything for me).

The best resource (in addition to the msdn doc on how to install 2010) is probably the Rehman Gul blog post titled “Sharepoint 2010 Configuration Wizard Errors on Windows 7”.

wow – I had a bunch of logging data in a datagrid and since it was larger than my page, I had to scroll to the bottom and scroll to the right continuously. Finally my co-worker wondered if we couldn’t put a scroll bar at the top.

Here’s how it works:

1) suppose you have a div with a horizontal scroll bar at the bottom

2) add another div above it with auto scroll on. (make it not too tall so you don’t see the vertical scroll bar) Put another div inside this one – this div will represent the content and will cause the overflow to fire.

3) the javascript function that wires all this up connects the “scroll” events from each scroll bar so that when one is scrolled, the other’s scroll event also gets fired