Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Adobe AIR Development

Reply
Trusted Contributor
Posts: 146
Registered: ‎03-22-2010
My Device: Not Specified

control added but not showing pls help

Hello all,

i have started  tablet development and new to action script.

i want to design a control like Tree in flex , i have written following code,

 

var treeData:XML= <root>

 

<node label="Parent 1">

<node label="Child 1" />

<node label="Child 2">

<node label="Grandchild 1" />

<node label="Grandchild 2" />

</node>

<node label="Child 3" />

<node label="Child 4" />

</node>

</root>;

 var sampletree:Tree=new Tree();

 

sampletree.dataProvider=treeData;

sampletree.x = 5;

sampletree.y = 50;

sampletree.width = 500;

sampletree.height = 500;

 

sampletree.showRoot=true;

sampletree.labelField="label";

 

addChild(sampletree);

  

stage.nativeWindow.visible =

true;

i get no error on compilation but when i run the programm i get a blank screen.

anybody to help?

Also where can i get samples for playbook which demonstrates all control available.

thanks in advance.

Developer
Posts: 192
Registered: ‎09-23-2009
My Device: 9860/PlayBook/Dev Alpha
My Carrier: Plus GSM

Re: control added but not showing pls help

Maybe error is not in tree control creation, but in main app code. Field creation looks ok, have you tried to put this code in simple hello world from developers introduction guide?

Found my post helpfull? Like it! It solves your trouble? Help others and accept it as solution. Search before asking.
My apps: Secret Cod3s | Should my tablet be banned?
--
Jakub Nietrzeba
PGS Software S.A.
Your reliable partner in Poland - IT Outsourcing - BlackBerry, iPhone, Web and Standalone applications
Developer
Posts: 107
Registered: ‎11-20-2009
My Device: Tegra 2 Android tablet and Playbook
My Carrier: Rogers

Re: control added but not showing pls help

[ Edited ]

Can it be becasue Tree is mx.controls.Tree ? If yes, it wont work if you trying to add it to the Sprite.

Dont remember the class name for QNX tree control, please try to use it

http://riahut.com
Trusted Contributor
Posts: 146
Registered: ‎03-22-2010
My Device: Not Specified

Re: control added but not showing pls help

yes i have added this in simple hello world program.

 

yes tree is a mx.control.

There is no control named tree in QNX.

so i cant use it?

if not then what will be the proper control like tree in QNX?

 

Please reply.

Developer
Posts: 6,541
Registered: ‎10-27-2010
My Device: HTC One, PlayBook, LE Z10, DE Q10
My Carrier: Verizon

Re: control added but not showing pls help

"Tree" controls on mobile devices are "typically" implemented as a single list, and then when an item is selected, tweens to another list.  A gesture to the left will go back to the parent list.

 

Since no world on an updated SDK after 0.9.1, and if you're trying to get a free PB, I would proceed without any expectations of having a QNX Tree control.  Suggest creating two lists that tween back and forth and fill the list from an internal hierarchial data structure depending on the current selection.

 

Hope that helps.

Trusted Contributor
Posts: 146
Registered: ‎03-22-2010
My Device: Not Specified

Re: control added but not showing pls help

any one please help?

i just read about section list.where can i get a sample or how it looks like?

Developer
Posts: 6,541
Registered: ‎10-27-2010
My Device: HTC One, PlayBook, LE Z10, DE Q10
My Carrier: Verizon

Re: control added but not showing pls help

Trusted Contributor
Posts: 146
Registered: ‎03-22-2010
My Device: Not Specified

Re: control added but not showing pls help

[ Edited ]

so does that mean that i cannot use mx.controls like tree?

i read discussion at http://supportforums.blackberry.com/t5/Tablet-OS-SDK-for-Adobe-AIR/MXML-vs-ActionScript/td-p/623165/...

so has any one found solution for this?

will mx.xontrols work on playbook?anybody from RIM to answer this?

Highlighted
Developer
Posts: 6,541
Registered: ‎10-27-2010
My Device: HTC One, PlayBook, LE Z10, DE Q10
My Carrier: Verizon

Re: control added but not showing pls help

Just a suggestion, but I would go with multiple lists to have a tree-like functionality.  It is more finger touch friendly, consistent with other mobile devices in the use of gestures, and probably less memory intensive since the GUI does not have to render so much.

 

With so much that BB has to do in the next month (bugs, simulator, stability, etc.), I would not pin my hopes on a new QNX tree control in the next 30-45 days.

 

I would also not expect for BB to respond officially to what might or might not be available since they have not (for the most part) done so from other posts.