[Lazarus] Lazarus questions (auto complete, searching, docking, edit height)

Marius fpclazarus at home.nl
Fri Oct 10 00:32:15 CEST 2008


On 10/9/08, Sergei Gorelkin <sergei_gorelkin at mail.ru> wrote:
>
> Bart wrote:
> >
> > Then how can I free those TDOMNodeList objects? I.o.w. how can I get
> > access to them?
> >
>
> You just put them into a variable and later call Free:
>
> var
>    Nodes: TDOMNodeList;
> ...
> Nodes := MyNode.ChildNodes;
> writeln(Nodes[0].NodeName);
> ...
> Nodes.Free


How should I apply that to my code-example?

> In general, any tree can be built using only the AppendChild method.
> Just put necessary nodes in variables. Here is your example:
>
> [snip]
>


I tried the examplecode, I had to replace
  tmp['id'] := '0001';
with
  TDOMElement(tmp).SetAttribute('id', '001');
(it would not compile otherwise: the error said something about tmp not
having a default property)

This code creates the xml-file like I wanted it.
I'm going to study the code and try to understand it.

Thanks for the help!

Bart
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20081009/8f182822/attachment-0007.html>


More information about the Lazarus mailing list