[Lazarus] New menu designer. which style do you prefer?

Ondrej Pokorny lazarus at kluug.net
Sat Jan 16 22:08:11 CET 2016


On 15.01.2016 23:30, Howard wrote:
>> Sorry, my apologies - I missed that you didn't try it.
>>
> Yes working fine for me (Windows 7 32bit and Linux 64 bit).
> I'm relieved that such a simple change has had such a good effect, and 
> that no further tinkering with TShadowMenu size and positioning code 
> was required; and that my poorly implemented scrolling code can 
> therefore be dumped entirely.

Yes, you must have wasted a lot of time on the extra scrolling code :(
+ Could you take a look also at this one?: 
http://mantis.freepascal.org/view.php?id=29399
Basically you should use a simple parented TEdit and not a modal dialog. 
Take a look at grids in-place editor.

To me it seems that you have taken hard and complicated routes at a lot 
of places in the new menu editor, which are very bug-prone, hard to 
maintain and hard to understand - instead of using easy and simple ways. 
As a result, you wasted your time and also mine and others that tried to 
understand what's going wrong in the unnecessary code and tried to fix it.

This is also the case of resource strings. Take a look e.g. at r51249 
and r51305. Why was the dialog so complicated with duplicate strings? 
Yes and No as answers are clear enough.
It stated:
"Deleting this item will delete all subitems too.
Delete this item and its subitems?"
You use the word delete three times, (sub)items 2+2 times. Why? (And I 
don't count the dialog title and former buttons.)
Why not only the second line?: "Delete this item and its subitems?" -> 
again it is clear enough. Furthermore, using the same words and phrases 
over and over again is stylistically wrong.

Honestly, the new menu editor is a translator's nightmare. Although I do 
like what the new designer does, I don't really like how it is written 
:( I tried to fix some code but I am somehow already tired to go through 
all the issues.

Please don't get me wrong - I don't want to offend you in any way. I 
just want to explain that you should use the KISS-principle whereever 
possible. It will not only save everybody's time but also lead to better 
code. (I know, I also have hard time to apply KISS.)

Ondrej

PS: Just for comparison:
BEFORE:


AFTER:


Even as a user, I need much more time to understand what's going on in 
the first dialog...
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20160116/a0b161a1/attachment-0003.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fiacfche.png
Type: image/png
Size: 3020 bytes
Desc: not available
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20160116/a0b161a1/attachment-0006.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gchfchdc.png
Type: image/png
Size: 1869 bytes
Desc: not available
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20160116/a0b161a1/attachment-0007.png>


More information about the Lazarus mailing list