HaikuArchives / Calendar

:calendar: A native Calendar application for Haiku.
MIT License
29 stars 20 forks source link

BMessageRunner set up in daemon #129

Closed harshit-sharma-gits closed 1 year ago

harshit-sharma-gits commented 1 year ago

For issue: #122

Scope of PR: Set up BMessageRunner to get alerts at the right time

I'm having some difficulty in setting up the BMesageRunner. It currently is not working as (I think) it is, a local variable in the constructor. And it gets destroyed when the constructor completes. Do we need to have it as class member, or is it not necessary? Can we set it up under BApplication (Somehow?) It's a bit confusing as the documentation also does not provide any pointer regarding this.

Also please look at the code, am I in the right direction with this approach?

harshit-sharma-gits commented 1 year ago

I made the fMessageRunner a class member and tested it for sending the message fEventNotify with data name, place, and deltaTime. It works fine.

Can you please test it on your end @nielx @humdingerb ?

harshit-sharma-gits commented 1 year ago

Now I am creating the notifyMessage on the stack, so the problem of it leaking out is solved. Also, I did some testing of the Daemon at my end, and it is working as expected.