procedure notify(...)

Writing and using PopTray plug-ins

Moderators: KY Dave, jojobear99, Rdsok

Locked
Innuendo
Still here
Posts: 6
Joined: Tue Dec 28, 2004 10:03 pm

procedure notify(...)

Post by Innuendo » Fri Jan 07, 2005 4:06 pm

Hi to everybody,
i'm developing a notify plugin, but i'don't manage to understand whene notify procedure is call by application. I have 2 account in my preferences but strangely, putting a showMessage in the procudure, i recieved 3 message and not 2.

Can anybody explain this?

Innuendo

User avatar
Renier
Site Admin
Posts: 1957
Joined: Mon Oct 15, 2001 12:54 pm
Location: Cape Town, South-Africa
Contact:

Post by Renier » Mon Jan 10, 2005 8:44 am

It should get called for each message. And also when the messages are viewed to know that you should remove your notification indicator (if I remember correctly)

Innuendo
Still here
Posts: 6
Joined: Tue Dec 28, 2004 10:03 pm

Post by Innuendo » Mon Jan 10, 2005 11:04 am

So, if i have 2 mails recevied from an account ad 1 from another, procedure is called two times, isn't it?

tnx

Innuendo
Still here
Posts: 6
Joined: Tue Dec 28, 2004 10:03 pm

Post by Innuendo » Mon Jan 10, 2005 11:05 am

Error: i have mistake, 3 times...right?

User avatar
Renier
Site Admin
Posts: 1957
Joined: Mon Oct 15, 2001 12:54 pm
Location: Cape Town, South-Africa
Contact:

Post by Renier » Mon Jan 10, 2005 4:23 pm

3 times, yes.

Innuendo
Still here
Posts: 6
Joined: Tue Dec 28, 2004 10:03 pm

Post by Innuendo » Tue Jan 11, 2005 11:08 am

exact, but i don't understand: in procedure notify is passed the var mailcount so i immagine i should be called only when the account check is finish and not for every mail header, like procedure messageCheck...i don't understand its behaviour...can you explain me? for example, if i want to impement a plugin that show a popup reporting : "2 mail from X account"? i don't manage to do it, beacuse if notify is called for each message i don't understand which one is the last...i hope you understand me

User avatar
Renier
Site Admin
Posts: 1957
Joined: Mon Oct 15, 2001 12:54 pm
Location: Cape Town, South-Africa
Contact:

Post by Renier » Wed Jan 12, 2005 8:37 am

Sorry, just speaking from memory I was a bit wrong.

There are there methods involved:
  • MessageCheck gets called for each message
  • NotifyAccount gets called once for each account
  • Notify gets called once for each check.
What could possibly be happening is that if you have the "Reset Mail Count in Tray when Viewing" option on is that the Notify procedure gets called again to let the plugin know that some has already seen the messages.

Innuendo
Still here
Posts: 6
Joined: Tue Dec 28, 2004 10:03 pm

Post by Innuendo » Wed Jan 12, 2005 3:43 pm

i've set "Reset Mail Count in Tray when Viewing" option off, but making many tests now procedure notify is called 4 times when the application found 1 mail from an account and 2 from another...i don't know. Therefore, in the keyboardlights example plugin there isn't notifyAccount procedure...is there a documentation to make plugin or at least the complete interface procedures? Should you give me some informations more?

User avatar
Renier
Site Admin
Posts: 1957
Joined: Mon Oct 15, 2001 12:54 pm
Location: Cape Town, South-Africa
Contact:

Post by Renier » Wed Jan 12, 2005 4:02 pm

You can look at uPlugins.pas for all procedures. The screensaver plugin might also be useful (as an example).

Sorry I don't have more detail, and it was never extensively tested since nobody (except me) has written a notify plugin so far. I would suggest that you put those message count params in your messagebox and see what changes as the procedure gets called more and more times.

PS. What plugin do you plan to write?

Innuendo
Still here
Posts: 6
Joined: Tue Dec 28, 2004 10:03 pm

Post by Innuendo » Thu Jan 13, 2005 3:31 pm

Sorry I don't have more detail, and it was never extensively tested since nobody (except me) has written a notify plugin so far.


It's strange, notify procedure continues to be called a number of times that i don't understand...i don't manage to undestand any logic, because the result is different from execution to execution...
I would suggest that you put those message count params in your messagebox and see what changes as the procedure gets called more and more times.
i already do it
PS. What plugin do you plan to write?
i developed a plugin for my notebook to switch on/off asus led from incoming mail, but i'm interesting to develope more pulgins. By the way i like very much your work.[/quote]

User avatar
jskinner
Groupie
Posts: 55
Joined: Wed Mar 09, 2005 9:25 pm
Contact:

Post by jskinner » Fri Mar 11, 2005 7:06 am

I think there is a bug in the number of times Notify() is being called. From my testing its being called 3x the number of checks.

Locked

Who is online

Users browsing this forum: No registered users and 2 guests