Wednesday, December 2, 2009

super-r-r-r-r-r

So what else could one do with the Wikipedia API ? Here are some more uses:

1. A Wordpress plugin which auto links terms to Wikipedia articles.

2. A "better" Wikipedia search which hooks up Google "Did you mean" with the Wikipedia API, so that misspellings also direct to the correct article.

3. A Firefox extension which allows single click querying of terms.

The Wikipedia API was dissected by Pratham who maintains a very interesting tumbleblog at pratham.name and tweets here. Note that this not an official API (Wikipedia is not talking about this yet), therefore use on a production system is not advised.

Related: Track Changes To Your Favorite Wikipedia Articles

 



This mail was sent via Mail-SeCure System.

wertyu

So I finished the pin ball game, and it kept score and had levels, but when the game was over, it just started a new game. I figured it would be neat to create an add-in that extended the pin ball game and kept track of high scores.

I followed the same procedure as before to create an entirely separate project called SoapBox.Demo.HighScores. I created a new Pad called HighScores that inherits from SoapBox.Core.AbstractPad. It takes care of loading, displaying, and saving the high scores. Then, I had to write an IExecutableCommand extension that hooked into the GameOverCommands extensibility point on the pin ball game:

testing

  • Check out WorkBenchView.xaml in the SoapBox.Core.Workbench project to see how to implement a WPF menu with the MVVM pattern, including menu separators.
  • SoapBox.Core.Contracts has a helper static class called NotifyPropertyChangedHelper that lets you implement INotifyPropertyChanged without using hard coded strings for property names.
  • Everything that implements SoapBox.Core.IControl (which is pretty much every menu item, status bar item, and tool bar item) has a VisibleCondition property. This can be set to anything that implements SoapBox.Core.ICondition, but I recommend using SoapBox.Core.ConcreteCondition for this. A "condition" is just an abstraction of a boolean condition that one part can export and other parts can import.
  • Anything that inherits from AbstractCommandControl (buttons, usually) has an EnableCondition property that controls if the button is enabled. If it's not enabled, it automatically changes the icon to gray scale.
  • Take a look at PinBallOptionsItem and PinBallOptionsPad to see how to extend the Options dialog and store your editable options in the user settings.

 



This mail was sent via Mail-SeCure System.

Tuesday, December 1, 2009