On Tue, 25 Jan 2011, Mattias Gaertner wrote:
On Tue, 25 Jan 2011 10:18:45 +0100 (CET)
[email protected] wrote:
On Tue, 25 Jan 2011, Mattias Gaertner wrote:
On Tue, 25 Jan 2011 06:45:53 +0000
Frank Church <[email protected]> wrote:
I am finding the NoGUI option useful in converting projects using
TDataModules to Linux, but there is some talk about phasing it out.
There are no plans to phase it out.
Can anyone clarify the original purpose behind its existence and whether it
is problem free so long as no forms or controls are activated within the
App?
Its purpose is to create non gui tools from gui
applications.
Can you expand on that ?
Because to me, that sentence sounds like someone scratching his nails over a
blackboard... If an application is well-designed, the back-end has no GUI
dependencies and can be re-used in any environment, GUI or not.
Yes, a well design is the preferred solution.
But redesigning an existing GUI app costs time. The nogui widgetset
can be a step to that redesign.
For example:
Some users wanted to compile a lazarus project at command line (with
packages, po files, lrs files, resource files, ...). The Lazarus Team
took a week to create a basic tool from the IDE. A complete redesign
would take much longer and there are other priorities. Since then we
gradually redesign the code. Using hooks instead of directly calling
LCL functions and splitting units. So eventually we well get a
well design not needing the nogui widgetset for lazbuild anymore. But it
has low priority, so the change is slow.
Without the nogui widgetset there would be no lazbuild, because the
task would be so big, that no one would have started it.
This is IMHO a fallacy.
As we say in dutch: Soft doctors make stinking wounds.
If you would have bitten the bullet from Day 1, you would not be in the
situation where you are now. It will linger forever, exactly because it is
no longer a priority. If there was no nogui, you would now have a good
design. Yes, it would have been a painful 2 weeks or even a month.
But the end result would be better.
You need Marco van de Voort on your team; He's a proponent of radical
changes for the good. One day you would simply find yourself with a complete
new API ;-)
In the use case of the original code:
When using a TDatamodule, there is no GUI, hence there should be no need for
the nogui module ?
The LCL provides some useful methods for non gui apps too.
There are plans to split the LCL and IDEIntf into the gui and nongui
parts.
This is definitely a good thing and a step in the right direction.
Michael.
--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus