ZeddZull;248158 Wrote: 
> I have created a plugin that works with SuperDateTime.  I used the
> OceanTides plugin, as suggested, for my base and it is working, but I
> am not sure what each paramter in the addDisplayItem function does. 
> Can you provide some documentation for the public interface?
> 
> Thanks
Good to see someones looking at the external interface.  I created that
so long ago I can't even remember myself.

First parameter is what module is adding the display item.  So you'd
use a unique name for your plugin.

The next two are the top and bottom display text lines.

Next is how long the item is displayed with each pass... ie 5
seconds...

Next is an expires time value. This is used in the processExpired sub
(see below).

Finally is the time the value was added.  This is used in the
saveCycles sub (see below).

The last two arguments should be optional and are only utilized if your
plugin makes use of the saveCycles sub.

So if your plugin registers with SuperDateTime then superdatetime will
call your plugin whenever it does it data refresh.

When your plugin is called it can add new display items with the
addDisplayItem function.  It can also call the saveCycles function. 
The saveCycles function will retain previous display items that your
plugin added.  It's arguments determine which display items are
retained (either all or based on time they were added).  The
processExpired function compares the expiration time specified when a
display item was added with addDisplayItem with the current time.  Any
items that have not yet expired are saved.  Any previously added
display items not saved by saveCycles or processExpired are wiped out
with the data refresh.

saveCycles takes 3 arguments.

The first is the plugin name that you specified when you added an item
with the addDisplayItem function.  This is required.

The next is a time value for comparison.  This is optional.

The final value is either 'b' or 'a'.  For before or after.  If
specified saveCycle with only save cycles that have a time added
before/or after the time comparison value.  This is optional.

The processExpired sub just takes a single argument.  Which is the name
that you specified when you added an item with the addDisplayItem
function.

What's your plugin do?

Hopefully this all made sense, let me know if you need any
clarification.

Thanks
-Greg


-- 
GoCubs
------------------------------------------------------------------------
GoCubs's Profile: http://forums.slimdevices.com/member.php?userid=312
View this thread: http://forums.slimdevices.com/showthread.php?t=14327

_______________________________________________
plugins mailing list
[email protected]
http://lists.slimdevices.com/lists/listinfo/plugins

Reply via email to