PDA

View Full Version : XML data in TabSlider aligns funky


bclover
04-27-2004, 06:57 PM
Ok,

I'm loading in XML data from an external file called news.xml, creating a dataset, and assigning data to a view within a tabelement in a tabSlider component.

The XMl data displays halfway down the tabelement area...and all the tabs are pushed outside of the window. It's all kinds of funky eye junk! :-(

Can someone please look at my code and tell me what the heck I'm doing wrong?

Arrgggh! I'm pulling my hair out trying to learn LZX.

The tutorials are too simple...and I get real bogged down when I try to do anything slightly more complicated than those! Man, this sure is humbling!

Any help is gretaly appreciated!

--BC

bclover
04-27-2004, 07:00 PM
Here's the news.xml file to go in the same folder as the .lzx file attached above.

--BC

antun
04-28-2004, 08:51 AM
The XMl data displays halfway down the tabelement area...and all the tabs are pushed outside of the window. It's all kinds of funky eye junk! :-(


That was happening because you put the view named newsDisplay outside of the "News Flash..." tabelement, so it was behaving strangely. Inside of a tabslider tag, you're only supposed to have tabelements, or subclasses thereof. What you probably want is:


<tabelement onselect="LzAudio.playSound('tabSound');" text="Who We Are...">
<simplelayout axis="y" spacing="2"/>
<view name="newsDisplay" datapath="news:/xml/phonebook/contact">
<simplelayout axis="y"/>
<text datapath="firstName/text()"/>
<text datapath="lastName/text()"></text>
<text datapath="homePhone/text()"></text>
<text datapath="workPhone/text()"></text>
<text datapath="cellPhone/text()"><p/></text>
</view>
</tabelement>


Note I also added a <simplelayout>, since newsDisplay will replicate.

The tutorials are too simple...and I get real bogged down when I try to do anything slightly more complicated than those! Man, this sure is humbling!

I hear ya. There is a developer's guide that's being developed currently (and will be out soon!) that will fill that void between the tutorials and sample applications.

-Antun

PS one thing you might find useful for debugging visual stuff is to give things background colors as you're developing to see what's going on:


<view name="newsDisplay" datapath="news:/xml/phonebook/contact"
bgcolor="blue">