The Artima Developer Community
Sponsored Link

Agile Buzz Forum
Developing for BottomFeeder

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
James Robertson

Posts: 29924
Nickname: jarober61
Registered: Jun, 2003

David Buck, Smalltalker at large
Developing for BottomFeeder Posted: Mar 19, 2005 12:10 PM
Reply to this message Reply

This post originated from an RSS feed registered with Agile Buzz by James Robertson.
Original Post: Developing for BottomFeeder
Feed Title: Cincom Smalltalk Blog - Smalltalk with Rants
Feed URL: http://www.cincomsmalltalk.com/rssBlog/rssBlogView.xml
Feed Description: James Robertson comments on Cincom Smalltalk, the Smalltalk development community, and IT trends and issues in general.
Latest Agile Buzz Posts
Latest Agile Buzz Posts by James Robertson
Latest Posts From Cincom Smalltalk Blog - Smalltalk with Rants

Advertisement

One thing that I haven't made that clear about BottomFeeder is that it's been designed for extensibility via plugins - I've created a number myself - the Posting Tool and the Enclosure Handler. I've packaged TypeLess as a plugin, as well as a number of games that Steve Kelly fixed up for later releases of VisualWorks. I've also done some additional work on Bob Westergaard's scripting plugin. All of this stuff either ships with BottomFeeder, or is available for download via the update tool.

The plugin mechanism is pretty simple. There are a number of events that BottomFeeder reports that make it easy for applications to deal with things happening:

  • #bfOnline - reported when the application goes online
  • #bfOffline - reported when the application goes offline
  • #bottomFeederStarting: - reported when BottomFeeder is starting. The RSSFeedViewer instance is sent as an argument
  • #bottomFeederQuitting: - reported when BottomFeeder is quitting. This happens both in development and in deployment - the RssFeedViewer instance is sent as an argument
  • #quitting - reported in deployment only, when BottomFeeder is quitting. BottomFeeder will not quit until all handlers have returned
  • #addedFeedList: - reported when a feed list has been added. The FeedList is sent as an argument
  • #addedFeed: - reported when a feed has been added. The Feed is sent as an argument
  • #newItemsFor: - reported when there are new items in a feed. The Feed is sent as an argument
  • #removeFeed: - reported when a feed is removed. The Feed url is sent as an argument
  • #removeFeedList: - reported when a feedlist is removed. The Feedlist url is sent as an argument

The other thing you need to do is register your plugin with BottomFeeder. The way you do this is to add a small message to the #postLoad action of your plugin parcel (the plugin should be packaged as a parcel). That snippet looks like this:


#{RSS.RSSFeedViewer} ifDefinedDo: [:cls | 
	cls registerPluginClass: BlogTools.PostingTool 
	startupMessage: #openWith: 
	label: 'CST Blog Tool'].

That's the message send that's used by the Posting Tool to register itself. There are actually two forms of registration possible, depending on what your plugin is going to do:

  • registerPluginClass: aClass startupMessage: aSymbol label: aString
  • registerPluginClass: aClass startupMessage: aSymbol label: aString isForUI: aBoolean

You can send the second to specify that there's really no UI if necessary; the first will assume one and add an item to the 'plugins' menu. Finally, there's a way to unregister a plugin as well. This code should be put into the parcel preUnload: block:


unregisterPluginClass: aClass

With that, you can properly unhook the menu addition. That's pretty much it. You should probably be familiar with the codebase for BottomFeeder to work with this, but that's easy enough - it's all in the public store.

Read: Developing for BottomFeeder

Topic: New Enclosure Support Previous Topic   Next Topic Topic: Don't Ask, Don't Smell

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use