Friday, January 25, 2008

this.age++;

The years seem to keep getting shorter, and I seem to be getting less and less done.  I'm hoping to change that this year since I've been running this site for 4 years now and have only made a handful of posts.

I'm looking to make some pretty big changes to both of my sites in the near future.  Paradoxlost.com will become much less Decal-centric in the future.  I have considered both hosting my personal projects on this site and creating a projects sub domain on paradoxlost with the ability to categorize things much better.  Either project will be fun to write.

I have two paths that I intend to follow for site upgrades.  I'll be rewriting this site using the new ASP.NET MVC framework (available here, lots of information from ScottGu here).  My non-windows sites will be moving to Python, particularly extending the web.py framework.  I love playing with python, and I've found web.py to be particularly useful for play.  It's very non-intrusive.

Decal is still moving forward.  I don't know what the future holds for AC, but we do still throw code into poor old Decal.  It's been in beta for so long that I think parts of it are getting moldy.  To help with things we recently recruited a new guy into the core team.  Those of you who still visit #acdev know him as Flynn and on VN/IGN he goes by Thorfinn_Sigurdssen.  He jumped right into the new view system, and it actually saw a lot of code churn before the holiday season (and final exams).

And for anyone starving for a new release of decal, join #acdev (irc.sorcery.net).  We could use some lively discussions to get us interested and motivated in AC again.  Who knows, you might even convince us to reactivate our AC accounts!

Until next time!

posted on Friday, January 25, 2008 7:08:08 PM (Central Standard Time, UTC-06:00)  #    Comments [0] Trackback
 Thursday, November 29, 2007

So I've been working with mass archiving Office documents at work lately.  Part of this process is extracting meta data information from the files such as subject and author.  Microsoft has had a "sample" component out for a while to accomplish this:  DSOFile.  Using this component brings up COM Interop fun which I like to avoid if possible.

Having a bit of free time on my hands, I set about looking at rewriting DSOFile using C++/CLI.  This actually turned out to be pretty easy once I figured out how msclr::com::ptr worked and DSOFileNET was born.

posted on Friday, November 30, 2007 2:55:49 AM (Central Standard Time, UTC-06:00)  #    Comments [0] Trackback
 Monday, September 17, 2007

The ASP.NET AJAX UpdateProgress control is rather limited.  It only shows up for UpdatePanels and then only for one at a time.  This was highly annoying, since I needed it to display for the CascadingDropDown in particular.  After a few failed attempts, I found that it is very easy to create your own control that will work for any and all requests.

The secret for this method is found in Sys.Net.WebRequestManager.  This object contains two methods:  add_invokingRequest and add_completedRequest.  Using these two events, we can set a short timeout, and using a ModalPopupExtender, show a progress alert for every background action.

var wrm = Sys.Net.WebRequestManager;

wrm.add_invokingRequest(BeginRequest);
wrm.add_completedRequest(EndReqest);

function BeginRequest(sender, args)
{
setTimeout('ShowProgress()', 800);
}

function ShowProgress()
{
// show the modal
}

function EndRequest(sender, args0
{
// hide the modal
}

I leave the rest as an exercise for the reader.

posted on Monday, September 17, 2007 8:25:15 PM (Central Daylight Time, UTC-05:00)  #    Comments [0] Trackback
 Tuesday, August 21, 2007

Something that I happened upon this week after reading one-to-many post saying that VSTO Add-ins can't be installed for all users under Office 2007.  I knew it worked that way under Office 2003, and they couldn't have broken compatability that much in '07.  I was determined to find a workable solution to this problem because the sheer administrative overhead of needing each user to run the install or another patch mechanism was rediculous.

First, I had to identify the major difference between '03 and '07 when dealing with VSTO:  '07 supports it natively.  In '03 all VSTO Add-ins are loaded via a generic shim and are essentially regular COM add-ins.  In '07 the add-ins are loaded directly by the Office app, ignoring the shim.  To get around this issue, you have to cause '07 to load your add-in the same way that '03 would:  as a COM-shimmed add-in.  Invoking this behavior is a simple stroke of the delete key.

Setup your installer as normal, except having all registry entries defined under HKLM instead of HKCU.  Then navigate to HKLM/Software/Microsoft/Office/[APP]/Addins/[YourAddin].  Remove the "Manifest" value from this key.  This value being missing causes '07 to load your add-in via the ProgID [YourAddin], which eventually leads it to the VSTO AddinLoader and your real add-in via the Manifest defined under your CLSID/[GUID] entry.

There is a downside to this method:  If your add-in crashes, it will take out all other add-in using the AddinLoader via Office's disabled list.

posted on Tuesday, August 21, 2007 4:38:41 PM (Central Daylight Time, UTC-05:00)  #    Comments [0] Trackback
 Wednesday, August 08, 2007

In last night's episode of Eureka (Duck, Duck, Goose), the winner of the fair was Megan, daughter of Julie He(a?)rrington.  It's always fun to come across little things like this in life.

posted on Wednesday, August 08, 2007 4:10:18 PM (Central Daylight Time, UTC-05:00)  #    Comments [2] Trackback