PDA

View Full Version : Help in developing a today plugin


thehobbit78
28th November 2005, 09:55 AM
Hello everybody,

After searching without success a weather today plugin that meets my needs,
I decided to write a new application of my own, mainly because apart SPB Pocket weather (which shows very little information ie no moon data), no plugin allows to download data from a site of your choice.
I read all the documentation on MSND and from development forums, and I finally build the first version of the plugin, but I ran into a big problem.
Often the plugin disappear from today applet list, other times the plugin is not showed even if is active, and so on.
So, this is my help request: does anybody have a skeleton of a working today plugin? I really much appreciate some help!
Surely I will release my application on this forum, since I don't want to make money with it.

Thanks in advance!

vijay555
28th November 2005, 10:55 AM
There's a working today plugin in the sdk I think.

Also check here:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnppcgen/html/ppc_yapi.asp

There could be many reasons why your plugin is disappearing:
You're not trying to set its height to 0 or less are you? I've found that causes itself and other plugins to bugger up if you do that.

It could be disappearing from the today plugin list because it's causing a crash on being parsed by the today options dialog. ensure you've implemented any options dialog correctly, or not at all.

How are you parsing the weather data? I've got to write my own plugin to do this at some point... Are you parsing xml or hardcoded html pages?

V

thehobbit78
28th November 2005, 11:51 AM
First of all, thanks vijay for your reply.

As for your questions:

1) yes, I initially set vertical height to zero, then on the first WM_TODAYCUSTOM_QUERYREFRESHCACHE or when I need to resize, I set the cyp member of TODAYLISTITEM to my desired height and return TRUE. Are you sure that this could be the cause? Every sample I found uses this technic.

2) I've implemented an options dialog, but not via the specific exported function, so in the registry I set the "Options" key to zero.

3) The idea behind the weather data is: I read an XML file with certain keywords, wich is created by an external exe that reads weather data from internet and create the XML file. I have written code that reads from accuweather.com, but everyone who has some programming experience can write his own and read from his favourite forecasts site. Basically you have to read an internet page and create an XML file with my specification, then the today plugin reads and show data.

Bye!

vijay555
28th November 2005, 11:59 AM
Sounds like a good implementation.

1) is correct, that's how to set the size. I meant that if you try to fix the size to 0 at some point after first refresh, it causes it to screw up. But if you're always > 0 no problem.

2) If you've set the options registry to 0 it shouldn't be a problem. Presumably the options button is disabled in the today options settings?

3) Sounds good, looking forward to seeing it.

Hmmm. I know some of my plugins randomly used to disappear after changing the settings etc. I think it's really just some loose code somewhere, but they're hard to debug. If you get desperate you can send a copy over and I'll try to look over it, but I think if you just fill in the blanks around the today plugin in the sdk, hopefully you should have a working model.

Oh, one thing that does come to mind:
"Painting problems with a PocketPC Today Screen plugin"
http://blogs.msdn.com/windowsmobile/archive/2004/10/06/238856.aspx

V

Rudegar
29th November 2005, 10:54 AM
http://forum.xda-developers.com/viewtopic.php?t=21786&highlight=today+plugin