# Friday, February 22, 2008

My wonderfully amazing wife gave me the coolest present for Valentine's day:  she named a star for me.  Even though I'm well aware that it will never be used officially, it's still one of the best gifts that I could have been given.  Below is a not-so-great view from Google Earth.  This summer, I'm going to see about getting some photos taken to show off.

ge_dp1

posted on Friday, February 22, 2008 4:05:15 AM (Central Standard Time, UTC-06:00)  #    Comments [1] Trackback
# 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 2: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 Thursday, November 29, 2007 9:55:49 PM (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 4: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 12: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 12:10:18 PM (Central Daylight Time, UTC-05:00)  #    Comments [2] Trackback
# Monday, October 30, 2006
I just wanted everyone to know that on last Thursday (Oct. 26) I married my long time girlfriend.  We've been together nearly seven years now, and knowing that I'll spend the rest of my days with her makes me happier than anything I've known before.

posted on Monday, October 30, 2006 9:57:33 AM (Central Standard Time, UTC-06:00)  #    Comments [0] Trackback
# Tuesday, June 20, 2006

For some time now I've been working on a project, QuickBuff/NB2-Lite, the former being its name, the later being its purpose.  The premise is to have a plugin that can take the old nb2 profiles we probably all have still laying around and run them.  Recently I've been making a lot of progress on this and have been able to ssuccessfully run buff profiles.  Unfortunately vital recovery is still incomplete, and I haven't yet started on equipment manipulations.

I very much wanted to bring back the old nb2, but between the network parser changes and the control infrastructure changing, that became less and less of a reality.  The network parser alone was enough to make me want to drop it since nb2 is just a huge network driven state engine.  Not to mention the sheer amount of code duplication within that engine.  I don't know how nerf ever managed to maintain this code as long as he did.

Expect to hear more on this in the future as I near the testing phase.  I'll probably also start requesting copies of your profiles so that I can make sure everything works as expected.

posted on Tuesday, June 20, 2006 3:15:49 PM (Central Daylight Time, UTC-05:00)  #    Comments [0] Trackback
# Thursday, June 15, 2006

I know I said something about tomorrow, but once I started working out the examples I wanted, I found many defiencies in my original setup.  I've since been working out a complete overhaul of the message system.  Once I complete the refining of the new system, I'll go over everything including the differences between the two.

posted on Thursday, June 15, 2006 5:51:35 PM (Central Daylight Time, UTC-05:00)  #    Comments [0] Trackback
# Tuesday, June 06, 2006

It's been a while since I've said anything about Decal so today I've decided to share some things about the next public release of Decal.  We've come a long way with Adapter and our new rendering code so this upcoming release will likely be the last time you guys see the old view system.  You can also expect a few other components to be completely redone and at least one to be gone forever.

There are two new features in Adapter that will be the focus of today's article.  One will make life easier for devs, the other will make things much more interesting for them.  Firstly, to make development and maintenance easier, I've added another code hook-up attribute to the system, BaseEvent.  The purpose of BaseEvent is very much like that of ControlEvent.  It works on the protected 'system' events that exist as part of PluginBase (which mostly come from ACHooks in the Decal core).  When applied to an event handler, these attributes will automatically hook up and tear down the connection to that event.

[WireUpBaseEvents]
public class Test : PluginBase
{
protected override void Startup()
{
// Network events
// this is the old way of doing it
//this.ServerDispatch += new EventHandler<NetworkMessageEventArgs>(Test_ServerDispatch);
}

[BaseEvent("ServerDispatch")]
void Test_ServerDispatch(object sender, NetworkMessageEventArgs e)
{
throw new Exception("The method or operation is not implemented.");
}

protected override void Shutdown()
{
// old tear down
//this.ServerDispatch -= this.Test_ServerDispatch;
}
}

This may not look like much since once you add the attribute, you only save one line of code.  What it does for you, is guarantee proper shutdown of all of your events.  I've found many times in my code where my tear-down code missed several events.

Now for the more interesting stuff.  Plugin devs often want to share the functionality of their plugin with others.  They also sometimes want to get information from other plugins.  This can't always be implemented to suit all (depending on language/knowledge/etc) so we've added a message notification system to Adapter to help things along.  With the next release of Decal, all Adapter plugins will be able to consume a single event "AdapterMessage", and they will be notified of all messages sent between plugins.  Sending a message is very simple as well, you just derive an object from AdapterMessageEventArgs, add in the information you want to share, and call SendAdapterMessage.

I'll talk a bit more about messages tomorrow, along with some examples on how to use it.

posted on Tuesday, June 06, 2006 9:30:53 AM (Central Daylight Time, UTC-05:00)  #    Comments [0] Trackback