First i wouldn't use the basetab pane class, I dont think it was ever
designed for dynamic tab creation (same with the slider class).
I would try breaking it down into something easy, then work up.
So you want a series of tabs based on data, simply put that is a view
with clickable text nodes that are based on the XML. If you want to
know which node is clicked simply pass up the node, you then have
access to the datapath which allows you to retrieve any information
you want.
Laid out like
<view layout="axis:x">
<view name="content"/>
<view name="tabs" layout="axis:y">
 <text datapath="xyz/text()" clickable="true"/>
</view>
</view>

I recently made a list selector in a similar fashion, basically
splitting 2500 names into a tabable selector of lists consisting of 60
names each. Its fast and easily navigates the names in a quick and
concise manner.

z

On 5/17/07, mario ruggier <[EMAIL PROTECTED]> wrote:
Hi all,

need your help... following up on my questions of a few days ago, I
have prepared a reduced test lzx application that isolates the
problems very clearly (the lzx is attached).

I am simply trying to create child tabpane nodes to a tabs element,
dynamically via script. In this simplified version I am avoiding any
use of custom classes, not to confuse the issue. The issues to be
resolved (or verified as bugs) are the following:

1) It seems that one cannot create a tabs element via tag, without
adding (in-place-via-tag) any child tabpanes -- no tabpane children
would cause the following error:
ERROR: base/basetabs.lzx:122: undefined object does not have a
property 'setAttribute'

2) The attached lzx app has a method canvas.newWorktab(). The first
time this method is called (whether in the oninit on the tabs element,
or via clicking on the newWorktab control button) the following errors
are generated :
ERROR: lz/tabs.lzx:199: reference to undefined variable 'background'
ERROR: base/basecomponent.lzx:318: undefined object does not have a
property 'setColorTransform'

3) The width of the first tag-created tabpane is correct. But, from
the first script-created tabpane, the width is shrunk to what seems
the min necessary for the tab labels to fit in teh tabsbar,,,

4) How can I get the dynamically created tabpanes here to
automatically resize when the parent tabs element is resized (window
resize)?

Is any of these due to incorrectness in the code?
Is any of these a bug?
Is there an alternative to any of these?

Btw, I am using version 4.0, compiling to swf7. Other formats (swf8,
dhtml) give same problems (or more, in the case of dhtml).

I am kind of at a loss of what can be done... could anyone please look
into this and help me over these issues?

Thanks a lot...

mario


Reply via email to