|
From: Patrick E. <pa...@pa...> - 2004-03-25 05:07:28
|
On Wednesday 24 March 2004 16:27, joakim verona wrote:
> I can design the xml resource, but where should the rest of the
> code go, in the new improved layered design?
>
> this is what it currently looks like:
>
> tCmdMidiDelay, a command class that acts on the track structure.
> Should this go into a "kernel" dir?
I haven't thought about the whole command / project structure, so
anyone is pretty much an expert compared to me.
> tmidiDelayDlg, a dialog class. Should it be broken out, and put in
> the dialogs dir?
> Or, since the code will be trivial, just handled in a function?
I've been trying to answer that question myself, but I haven't come to
any conclusions. I do think it would be nice if the bulk of the
dialog code could be placed in the dialogs dir in many small files.
That said, the dialogs often need to execute some sort of code
related to the window they were spawned from.
One possible solution is to have the dialog act independently, but
have it call a function defined in an interface. See
tButtonLabelInterface for an example of how tMouseCounter interacts
with the piano window through an interface. If interfaces were
used, the dialog file would contain the interface and any code for
the dialog itself. The main source file would implement the
interface in the form of a function, performing whatever
manipulations were necessary. In fact, if the interface was
implemented by something in the kernel, an upper level class could
simply hook the dialog and the kernel code together though the
interface. Am I making sense? Do I sound sane? If you think my
ideas are flawed, I really want to hear about it.
Patrick
|