PDA

View Full Version : Using Librarys


moacsjr
02-01-2006, 05:31 AM
Hi people!

I´m trying to break my source lzx into others files.
I whant common functionalities to be into separated files. I can´t make this work using <library> tag.

It seams that I can put only one thing into a <library>. If I try to add more things it will not work.

What I´m doing wrong in my <library>

<?xml version="1.0" encoding="UTF-8" ?>
<library>
<dataset name="dtsNew">
<contato>
<codigo></codigo>
<nome></nome>
<sobrenome></sobrenome>
<fone></fone>
<email></email>
</contato>
</dataset>

<window
title=".:: Dados do Contato ::."
name="frmDadosContato"
width="400"
height="250"
resizable="true" visible="false">

<view>
<simplelayout axis="x"/>

<view width="100">
<simplelayout spacing="13"/>
<text text="Codigo:" name="lblCodigo" y="15"/>
<text text="Nome:" name="lblNome"/>
<text text="Sobrenome:" name="lblSobrenome"/>
<text text="Fone:" name="lblFone"/>
<text text="Email:" name="lblEmail"/>
</view>

<view width="100">
<simplelayout spacing="3"/>
<edittext name="txtCodigo" width="150"/>
<edittext name="txtNome" width="150"/>
<edittext name="txtSobrenome" width="150"/>
<edittext name="txtFone" width="150"/>
<edittext name="txtEmail" width="250"/>
</view>

</view>

<simplelayout inset="20"/>

<view align="right">
<simplelayout axis="x"/>
<button text="Confirmar"></button>
<button text="Cancelar"></button>
</view>

</window>
</library>

br549
02-01-2006, 09:22 AM

viaov
02-04-2006, 09:39 AM
Try making classes out of all of it.

like
<class extends="window"
title=".:: Dados do Contato ::."
name="frmDadosContato"
width="400"
height="250"
resizable="true" visible="false">


and then implement with <frmDadosCantato/>


not sure if thats good practice, still new to the language, but it works for me