BeforeNavigate2 Woes

September 23, 2006

There’s a bug I discovered a couple days ago where the Minibrowser sometimes displays the wrong URL and will jump to the wrong url if the external browser action is invoked (either by clicking the button in the Find pane or by clicking return in the Minibrowser).

This is caused by frame URLs invoking the BeforeNavigate2 event causing the minibrowser to think that its navigating somewhere else when in reality it’s probably just an Iframe loading an ad. The prototype for the function is:

afx_msg void CMiniBrowser::OnBeforeNavigate2(LPDISPATCH lpDisp,BSTR url,short flags,BSTR target,VARIANT FAR* post,BSTR headers,BOOL *cancel) ;

At first, I thought that just looking to see if the target length equaled 0 would be sufficient to detect/distinguish a frame. This is unfortunately not a safe assumption. After combing the internet (with Fact200 no less) and Usenet newsgroups, I was only able to find other people with the same question but no answers. After a whole bunch of trial and error, including using the TopLevelContainer method (which didn’t work!), I settled on the following:

afx_msg void CMiniBrowser::OnBeforeNavigate22(LPDISPATCH lpDisp,BSTR url,short flags,BSTR target,VARIANT FAR* post,BSTR headers,BOOL *cancel) {

IWebBrowser2 *wb;

LPDISPATCH container;

bool isFrame=false;

if (SUCCEEDED(lpDisp->QueryInterface(IID_IWebBrowser2,(void**)&wb)) && wb!=NULL) {

if (SUCCEEDED(wb->get_Parent(&container)) && container!=NULL) {







Side note: WordPress’s editor is absolutely horrendous for formatting code!


1.0b12 Released!

September 19, 2006

Following my semi-normal 2 week cycle, 1.0b12 has been released featuring mostly bug fixes. The major bug fix in this release is to Google Groups which changed their search result format thus causing Fact200 to return no results. Google has also changed the output of their Sponsored Listings which is why they don’t show up, but fixing this is way, way down on the list of priorities.

The most distinct new feature of this  release is the ability to adjust the text size in the results page using the ctrl+ and ctrl- combos. For us young folks (although I think I might be halfway into the middle-ground), having small microscopic type enables us to see more, yet for the older folks like my Dad, large type (we’re talking 24pt here) makes things much more comfortable.

In addition to adjusting the type size, you can also adjust thumbnail sizes from the keyboard. This was and still is customizable from the preferences dialog, but adjusting it from the keyboard is much faster and gives instant feedback (a big theme of Fact200).

There are various other subtle changes to help the UI be a little more intuitive and visible.

I’m about finished reading  Don Norman’s “The Design of Everyday Things”. Although it doesn’t contain any stunning revelations (considering Fact200’s UI, I’m sure this is a surprise to some of you), it codifies UI principles I’ve already read and known about for some time. I’m not sure where in the time-line it will occur, but I’ll probably do a systematic evaluation of the UI and try to iron out some of the obvious UI gaffes that are present in Fact200.

The emphasis of Fact200’s UI is to get people using it as easily as possible and I think by providing a typical search/Google look, it has accomplished this just fine. However, the ease of the initial features comes at a price of making the more advanced features harder to use, largely because they’re invisible.  The initial features also look a little too similar to traditional search results and thus there’s no apparent benefit to Fact200 vs. just using Google, although I think the hover previews are an exception to this. I’m currently thinking of averaging the difficulty out as much as possible so that the initial simple actions might become a little more difficult (or daunting), but the more advanced features will become more apparent and easier to use. Of course, ultimately this will all depend on user feedback.


September 15, 2006

Even the mighty G is not immune to javascript exploits and phishing scams.
Phising Exploit Discovered in ‘Google Public Search Service’

Even social networking news sites have their failures and ultimately, it seems like they’re still not a solution to remaining vigilant and getting information from a variety of sources.
digg – Troubles in Diggville


September 6, 2006

And the wheel keeps spinning…

Most notable in this version is direct image support and the addition of more minibrowser controls.

Direct image support comes in two parts. One part is the ability to download image based urls (i.e. non-html) provided that the image format is supported (jpg, gif, png,bmp). The other part is the ability to download associated images/thumbnails in lieu of rendering the html content (the rss/atom sources have special options that need to be set for this to work). The former is useful for things like image searches that might return image urls instead of images framed by html. The latter is most useful for video pages which would otherwise need javascript/ActiveX to render properly and it also alleviates Fact200 from having to create a preview. This feature makes Fact200 a reasonable image browser, offering the same hover previewing/thumbnail features to images as it already does to web pages. There is currently an arbitraily defined limit of 512K for images sizes just to prevent bad things from happening. Images beyond this size will show an ‘unsupported type’ icon.
The minibrowser has always remained pretty spartan and was mainly a method to view an entire html document should its extent exceed the limits of the preview. But navigating within the minibrowser is generally easier than switching to an external browser, so Fact200 has finally added some navigation buttons (in the Find pane so they’re hideable) as well as the ability to add the currently viewed URL to the library and ‘Pin’ it for later use. Now that it actually tracks where you go in the minibrowser, pressing the Enter key in the minibrowser will open the currently viewed url in an external browser; previously, Fact200 would only open the original URL that caused the minibrowser to open.