Showing posts with label technical difficulties. Show all posts
Showing posts with label technical difficulties. Show all posts

Wednesday, October 1, 2008

[Silverlight] Silverlight Beta 2 RC0 Released

Applications built using this release will work off of the Silverlight 2 RC0 Developer Runtime only. This is not intended for public deployment, as end users will not have a way to install a suitable plug-in to view the application. No existing public versions (released or beta) of Silverlight 1.0 or 2 Beta 2 will be auto-upgraded to this runtime. This is only for developers.

See http://silverlight.net/GetStarted/sl2rc0.aspx
and http://weblogs.asp.net/scottgu/archive/2008/09/25/silverlight-2-release-candidate-now-available.aspx

for more including downloads and breaking changes / new features.

Problems?
After I did the update, when I ran my application in IE I was prompted with the "Install Microsoft Silverlight" button... but how could that be? I just installed the new runtime?

With a little searching I came across this:

A quick fix when updating apps to RC0...if all you get is the "Install Silverlight" button, make sure your object type in your page is changed to
application/x-silverlight-2 instead of applicatiion/x-silverlight-2-b2

And poof! Works!


.

Wednesday, June 4, 2008

[VS2008, Silverlight] "The project type is not supported by this installation"

So I spent the last 5 hours trying to get my VS2008 [which I had to do a re installation on] to recognize and open my silverlight projects. After uninstalling and reinstalling I was faced with the error message when trying to open my Silverlight project:
"The project type is not supported by this installation"
I figured that there was an issue with the Beta Toolkit for Visual Studio 2008, so I began my journey of uninstalling those components, reinstalling them, running into issues, hacking the registry, and cursing a lot. After all this was said and done... I reinstalled the Tools only to get the exact same error again.

Searching this error I found a webpage that instructed me to do the following:

Launch a command window, navigate to C:\Program Files\Microsoft Visual Studio x\Common7\IDE (where x is the version number) and run:

devenv /setup
That's it. That's all. Works perfect now. Thank you Andrew Gunn... I love you.

ps. I was curious about devenv /setup so I looked it up... it appears to merge menus, toolbars, command groups etc from all packages available. Not exactly sure what this means FULLY, but I imagine it tells VS2008 about all the packages [including the Silverlight package] that are available to it and that somehow in my re installation this package was missed.

/shrug.

Tuesday, May 27, 2008

[Silverlight] XamlParseException when setting IsChecked flag in XAML

Alrighty, today I made a basic debug log to dump messages and test timings to. I wanted to setup a checkbox on my application to toggle the visibility [and to toggle off the logging/testing] of this debug panel... but when doing so I kept running into the exception:
A first chance exception of type 'System.Windows.Markup.XamlParseException' occurred in System.Windows.dll

Additional information: AG_E_PARSER_BAD_PROPERTY_VALUE [Line: 33 Position: 206]

My checkbox had two event handlers set up on them... one for Checked and one for Unchecked. These functions would toggle the visibility of the debug log. THIS is what I had done wrong however... I had also set in my XAML the IsChecked flag equal to true.

What this essentially did then, was call the event handler I had setup for Checked. Given that this event call was actually made before the entire page was loaded, I received an error when trying to toggle the visibility of the debug log which was not actually loaded into the DOM yet!

Thus here is my recommendation:
Never EVER set the IsChecked flag of a checkbox element in the XAML code itself, since there is a good chance that whatever elements you wish to command are not properly injected into the DOM yet.

After the page is initialized then add the line "[checkboxname].IsChecked = true" in the code behind... as this will guarantee that the DOM has been fully structured.

Friday, May 23, 2008

I hate blogspots WYSIWYG

I apologize for the messy layout of the below posts. I seem to be having disagreements with the WYSIWYG editor, namely when trying to add <> symbols. Flipping back and forth between HTML and COMPOSE view will seemingly change these for me, even after I've hard coded them in the HTML view as "&lt" and "&gt".