JDNdeveloper / Off-By-One

CMPS 115 Project: Jayden Navarro, John Gemignani, Alex Gonzalez, Kevin Cheng, Josh Innis
0 stars 0 forks source link

In DeleteABE, if Notification, remove alarm so alarm doesn't go off anymore #92

Closed JDNdeveloper closed 9 years ago

JohnGemignani commented 9 years ago

This is not storages responsibility. Delete button should save alarm to remove and upon successful deletion it should cancel it. Storage is just storage.

JDNdeveloper commented 9 years ago

John, I have a remove alarm function. Just call it in delete. On Mar 1, 2015 2:34 PM, "John Gemignani" notifications@github.com wrote:

Assigned #92 https://github.com/JDNdeveloper/Off-By-One/issues/92 to @JDNdeveloper https://github.com/JDNdeveloper.

— Reply to this email directly or view it on GitHub https://github.com/JDNdeveloper/Off-By-One/issues/92#event-244047570.

JDNdeveloper commented 9 years ago

Delete happens in multiple places. It would be much easier if your function handles this.

JDNdeveloper commented 9 years ago

There's a fundamental reason why this needs to be handled in your delete function: recursion. If you were to delete a reminder, all corresponding notifications would need to be deleted. In deleting them it would be done through your function, not through the delete button listener, and thus your delete function needs to call the remove alarm functions for each notification. The same is true for deleting a Lifestyle. Let me know if you disagree with this statement. If you do disagree, you can re-assign this issue to me and we'll discuss it on Monday.

JohnGemignani commented 9 years ago

Put, in ABE a method called, destroy or finish or delete or shutdown. What ever sounds like a good name.

Override it in notification to do whatever object specific cleanups are necessary. Or overload and super the base class. The later is probably better.

Then I can call this method against all ABE children and do any kind of cleanups without knowing anything or doing anything specific.

JDNdeveloper commented 9 years ago

That sounds like a good idea. Can you implement that in the ABE objects? On Mar 1, 2015 3:38 PM, "John Gemignani" notifications@github.com wrote:

Put, in ABE a method called, destroy or finish or delete or shutdown. What ever sounds like a good name.

Override it in notification to do whatever object specific cleanups are necessary. Or overload and super the base class. The later is probably better.

Then I can call this method against all ABE children and do any kind of cleanups without knowing anything or doing anything specific.

— Reply to this email directly or view it on GitHub https://github.com/JDNdeveloper/Off-By-One/issues/92#issuecomment-76638645 .

JDNdeveloper commented 9 years ago

Please don't assign this to me. On Mar 1, 2015 3:40 PM, jdndeveloper@gmail.com wrote:

That sounds like a good idea. Can you implement that in the ABE objects? On Mar 1, 2015 3:38 PM, "John Gemignani" notifications@github.com wrote:

Put, in ABE a method called, destroy or finish or delete or shutdown. What ever sounds like a good name.

Override it in notification to do whatever object specific cleanups are necessary. Or overload and super the base class. The later is probably better.

Then I can call this method against all ABE children and do any kind of cleanups without knowing anything or doing anything specific.

— Reply to this email directly or view it on GitHub https://github.com/JDNdeveloper/Off-By-One/issues/92#issuecomment-76638645 .

JDNdeveloper commented 9 years ago

I'm closing this one and opening two more more descriptive tickets. One for John and one for me.