EditEvent callback

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

EditEvent callback

Steve Youngs
Hi,
EditEvent.__init__ takes a callback parameter but it does not appear to
be used. Presumably it should be passed into EditPrimary__init__, as
other Edit classes do? There is code in EditEvent.save to call the callback.

There is a similar problem with EditRepository. EditRepository is also
missing calls to the callback function in EditRepository.save.

I can prepare a PR if someone can confirm these are not deliberate
omissions.

Thanks
Steve


_______________________________________________
Gramps-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-devel
Reply | Threaded
Open this post in threaded view
|

Re: EditEvent callback

prculley
I cannot find any instances of the callback being used for either of these editors in any current code.  So the omissions were probably just a case of add what is needed, and they were not needed.

If you do generate a PR, please give us a good example of how they would be used, as that would raise the odds of the PR being accepted.

Paul C.

On Sat, Jan 4, 2020 at 3:54 PM Steve Youngs <[hidden email]> wrote:
Hi,
EditEvent.__init__ takes a callback parameter but it does not appear to
be used. Presumably it should be passed into EditPrimary__init__, as
other Edit classes do? There is code in EditEvent.save to call the callback.

There is a similar problem with EditRepository. EditRepository is also
missing calls to the callback function in EditRepository.save.

I can prepare a PR if someone can confirm these are not deliberate
omissions.

Thanks
Steve


_______________________________________________
Gramps-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-devel


_______________________________________________
Gramps-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-devel
Reply | Threaded
Open this post in threaded view
|

Re: EditEvent callback

Steve Youngs

Thanks Paul. I agree with only adding code that is needed, so I'll create a PR for the EditEvent change only.

Steve.

On 05/01/2020 19:27, Paul Culley wrote:
I cannot find any instances of the callback being used for either of these editors in any current code.  So the omissions were probably just a case of add what is needed, and they were not needed.

If you do generate a PR, please give us a good example of how they would be used, as that would raise the odds of the PR being accepted.

Paul C.

On Sat, Jan 4, 2020 at 3:54 PM Steve Youngs [hidden email] wrote:
Hi,
EditEvent.__init__ takes a callback parameter but it does not appear to
be used. Presumably it should be passed into EditPrimary__init__, as
other Edit classes do? There is code in EditEvent.save to call the callback.

There is a similar problem with EditRepository. EditRepository is also
missing calls to the callback function in EditRepository.save.

I can prepare a PR if someone can confirm these are not deliberate
omissions.

Thanks
Steve


_______________________________________________
Gramps-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-devel


_______________________________________________
Gramps-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-devel
Reply | Threaded
Open this post in threaded view
|

Re: EditEvent callback

Steve Youngs

Done. PR986

On 05/01/2020 22:30, Steve Youngs wrote:

Thanks Paul. I agree with only adding code that is needed, so I'll create a PR for the EditEvent change only.

Steve.

On 05/01/2020 19:27, Paul Culley wrote:
I cannot find any instances of the callback being used for either of these editors in any current code.  So the omissions were probably just a case of add what is needed, and they were not needed.

If you do generate a PR, please give us a good example of how they would be used, as that would raise the odds of the PR being accepted.

Paul C.

On Sat, Jan 4, 2020 at 3:54 PM Steve Youngs [hidden email] wrote:
Hi,
EditEvent.__init__ takes a callback parameter but it does not appear to
be used. Presumably it should be passed into EditPrimary__init__, as
other Edit classes do? There is code in EditEvent.save to call the callback.

There is a similar problem with EditRepository. EditRepository is also
missing calls to the callback function in EditRepository.save.

I can prepare a PR if someone can confirm these are not deliberate
omissions.

Thanks
Steve


_______________________________________________
Gramps-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-devel


_______________________________________________
Gramps-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-devel


_______________________________________________
Gramps-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-devel