The Lounge is rated PG. If you're about to post something you wouldn't want your
kid sister to read then don't post it. No flame wars, no abusive conduct, no programming
questions and please don't post ads.
Well, I am still working on the Windows 7 version of my Rich Text Editor project, and still have a lot more work to do.
I am completely redesigning the API, and adding a lot of new functionality, such as the ability for AddIns to add new toolbar themes.
The Windows 7 Task Dialogs and Open/Save file dialogs have been implemented with some difficultly, explained in my 'The Windows API Code Pack' message below.
As this is mostly a straight port from the original VB version into C#, I was using some online code converters to cut down on the amount of typing. All of the converters I have tried use NRefactory, and it seems that NRefactory cannot handle inline functions in VB. All I could get is an 'Invalid Expression' error.
EDIT: NRefactory cannot convert the following class (Where in bold):
CONVERSION ERROR: Code could not be converted. Details:
-- line 16 col 12: "Get" expected
Please check for any errors in the original code and try again.
So it wants Public Get ReadOnly.....
EDIT2: The error occurred because of the Auto-Implemented property above the error line.
Stupid error message.
I think it will be faster to rewrite it by hand!
On a side note, it seems Visual Studio 2012 tries to run code after importing it from another project. I found this out when I imported a control from one project that used a static property from another class to create a full path, and VS gave me a 'Path Cannot Be Null' error on that line, and crashed the designer. When I switched that line to use another property that gave the same path (the first property was initialized with the value of the second [the first property is in a port of the ICSharpCode.Core PropertyService class]), the designer worked fine. VS2010 did the same thing, so I think it is a goof in the Intellisense parser system.
Not sure when it will be out, as I have run into a number of Visual Studio 'Features' that aren't all that helpful, such as the 'Code Running at Design Time' and some weird formatting errors (some syntax highlighting goofs, although there are less of those than there were in VS2010), as well as randomly changing indentation. It should (hopefully) be within the next few weeks, though.
I used to, but I am now moving fully into C#. I started out with VB, and always compiled with Option Strict On, and tried to never use the 'Shared Instance Methods' thing VB has. I always used either a singleton form or the My.Forms namespace.
Visual Studio 2012 tries to run code after importing it from another project
This is a general problem with Visual Studio, especially with WPF projects. I have it regularly with Visual Studio 2008. The XAML designer routinely fails when supporting classes don't compile cleanly, as is typically the case when you're refactoring. They rely on the runtime to do the heavy lifting while you're editing.
It's almost like a return to the days of the Ada development environments, where you had to implement from the bottom up because the compiler failed otherwise.