[Lazarus] Component palette enhancements

Michael Van Canneyt michael at freepascal.org
Wed Apr 6 14:47:02 CEST 2022



On Wed, 6 Apr 2022, Sven Barth via lazarus wrote:

> Michael Van Canneyt via lazarus <lazarus at lists.lazarus-ide.org> schrieb am
> Mi., 6. Apr. 2022, 12:56:
>
>>
>> 1. Currently a component is identified by its class name.
>>
>>     This should be enhanced: a component must be identified with
>> UnitName.Name.
>>     a unit name is a "namespace" and so MyControls.TButton <>
>> StdCtrls.TButton.
>>
>>     Currently there are several component name clashes in the pas2js and
>> FPC class trees.
>>
>
> The streaming system can't differentiate by unit name, so this simply isn't
> possible.

I know that.

We simply need to adapt the streaming system so it can, 
I already studied that, it's fairly trivial:

* When writing: write UnitName.ComponentName instead of ComponentName.
   A trivial change, which can be done in a backward compatible manner.

* When reading, there are 2 lines that must be changed:
   One in GetClass and one in TReader.FindComponentClass.

* To handle the text format, 2 lines need changing.

So this is not exactly lots of work.

> 3. Please add a search edit in the component palette, as delphi has it:
>>     typing in that edit should reduce the visible tabs to show only tabs
>> that have a
>>     component with the typed text in the classname, just like the one on
>> the component window...
>>     (the component window is IMO not really usable if you are not using a
>> docked IDE)
>>
>
> Why don't you use the component list instead of the palette then? This
> already provides a search.

If you read my message correctly, you'll see that I know this. 
Additionally my last sentence tells you why I don't use it...

Michael.


More information about the lazarus mailing list