|
From: | Éloi Rivard |
Subject: | Re: [Denemo-devel] Refactoring |
Date: | Sun, 3 Nov 2013 19:36:54 +0100 |
On Tue, 2013-10-29 at 17:40 +0100, Éloi Rivard wrote:
> Since you can access Denemo.gui from everywhere in the code, do youThe place where I am aware of DenemoGUI * being passed as a parameter is
> think it is judicious to get rid of "DenemoGUI * gui" parameters in
> every functions ? Or is it somewhere where you do need this
> parameter ?
in creation; so test scripts to
1) Open a file
2) Add Staffs from a file
3) Add Movements from a file
should be in place before trying to do this I think.
There could be other places when switching from one tab to another (that
is when the user has multiple scores open at once - each of these is
represented by a DenemoGUI* structure kept in a list in
DenemoRoot.guis). In such code the current musical score Denemo.gui is
changed to point to another element in Denemo.guis so care would be
needed not to assume that a parameter DenemoGUI *gui referred to the
global stored currently in Denemo.gui.
As I mentioned, it is a good idea, but I think we should have some basic
testing set up first. The actual tests will be quite easy to create (I
can do that easily) but the machinery to run them (create working
directories, store reference files, update reference files in cases
where the regression is desired etc) would be more of a challenge for me
just now. (I did, many years ago, set up an over-ambitious testing
scheme for the actual gui itself, hence the existence of the test
directory - this was much too early, but now is a good time for simple
testing, indeed it is long overdue and would save us a lot of
headaches).
Richard
[Prev in Thread] | Current Thread | [Next in Thread] |