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
New Contributor
Posts: 5
Registered: ‎05-04-2011
My Device: playbook

Container Layout example won't works.

Hello,

 

I'm just trying to achieve the container example from the developement guide 

http://docs.blackberry.com/en/developers/deliverables/23959/Using_containers_to_design_layout_144674...1.jsp#Use_spacers_to_define_layout_1446754_11

But when I copy paste the code example in my brand new AS3 mobile project I only get a blank screen.

Someone can help me?

 

Regards,

New Contributor
Posts: 5
Registered: ‎05-04-2011
My Device: playbook

Re: Container Layout example won't works.

It still doesn't work. I tried to use container in my own project but nothing works.

New Contributor
Posts: 5
Registered: ‎05-04-2011
My Device: playbook

Re: Container Layout example won't works.

[ Edited ]

Ok, it seems to work now. I had to add calls to the layout method after each addChild calls. It seems that the development guide is not up to date.

 

EDIT: It still not perfect - Components in the right container are not aligned in the middle of the container as they should be. I really don't understand.

Developer
Posts: 20
Registered: ‎04-27-2011
My Device: Z10

Re: Container Layout example won't works.

[ Edited ]

There are several possibilities why it does not work. A blank (or freezing) screen usually signifies that an error occured while running the program. Since it just stays blank a assume that it's a very basic error which doesn't even allow to load any content.

 

Are you using Flash Builder? Which version? Have you tried to run it in debug mode? That should tell you, which part of your code causes the error. I just copy&pasted it myself and it work perfectly fine.

New Contributor
Posts: 5
Registered: ‎05-04-2011
My Device: playbook

Re: Container Layout example won't works.

[ Edited ]

I'm using Flash Builder Burrito and the last blackberry SDK (1.0.1).
I tried in debug mode there is no error. But the screen is still blank if I don't add the .layout() calls.

Developer
Posts: 20
Registered: ‎04-27-2011
My Device: Z10

Re: Container Layout example won't works.

[ Edited ]

Interesting. I just copy&pasted the example 1:1 and it worked fine for me, I'm using Flash Builder Burrito and SDK 1.0.1 as well.

New Contributor
Posts: 5
Registered: ‎05-04-2011
My Device: playbook

Re: Container Layout example won't works.

Could you please upload your project somewhere?

 

Developer
Posts: 20
Registered: ‎04-27-2011
My Device: Z10

Re: Container Layout example won't works.

That wouldn't be of much use for you as it was pure copy&paste (which i stated before :smileywink: ). So the sourcecode was the same as in the sample.