[Lazarus] Creating dbexport component: no icon

Reinier Olislagers reinierolislagers at gmail.com
Fri Sep 16 15:20:28 CEST 2011


On 16-9-2011 14:55, Vincent Snijders wrote:
> 2011/9/16 Reinier Olislagers:
>> Hi list,
>>
>> I'm trying to create a button/component for the new fpXMLXSDexport unit
>> in FPC 2.6.x.
>>
>> What I did in the Lazarus\components\dbexport directory:
>> 1. I've modified regdbexport.pp to include registering the
>> TXMLXSDExporter element.
>> 2. Copied over tsimplexmlexporter.xpm to txmxsdlexporter.xpm, changed
>> XML to XSD in the image using my elite ASCII art skills
>> 3. Recreated resource file containing all .xpm resources:
>> c:\development\lazarus\tools\lazres dbexportimg.lrs tcsvexporter.xpm
>> tfixedlengthexporter.xpm tfpdataexporter.xpm tfpdbfexport.xpm
>> trtfexporter.xpm tsimplejsonexporter.xpm tsimplexmlexporter.xpm
>> tsqlexporter.xpm tstandardexportformats.xpm ttexexporter.xpm
>> txmxsdlexporter.xpm
>> 4. Recompiled the lpk, removed and re-added the lpk to my Lazarus install.
>>
> 5. Add {$I dbexportimg.lrs} to the unit which registers these components.
> 
Thanks, Vincent, that was already there in the existing code in
regdbexport.pp

Ooops, typo: txmxsdlexporter.xpm=>txmlxsdexporter.xpm

Now it shows the icon.
Sorry for wasting your time.


Next question: this button/component will only work from FPC 2.6.x
onwards (due to dependency on fpxmlxsdexport.pp).
What is the best way to get this into Lazarus?
Conditional compilation with FPCVER or upload it as a patch in Mantis
with a note and a certain Lazarus target version?

Thanks,
Reinier




More information about the Lazarus mailing list