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
Contributor
bharath_b
Posts: 19
Registered: ‎04-06-2011
My Device: TORCH 9800
Accepted Solution

Blank screen when qnx components are used??

Hello, I am new to blackberry.. when I use qnx components in the application.. only HOME title is getting displayed.. nothing is getting displayed.. But If i use a flash Button and if I use QNX components in the event listener of this button then those components are getting displayed.. Could nyone please help me out in this?
Please use plain text.
Developer
jtegen
Posts: 6,541
Registered: ‎10-27-2010
My Device: HTC One, PlayBook, LE Z10, DE Q10

Re: Blank screen when qnx components are used??

You will need to post some sample code so we all can take a peek in what you are describing.
Please use plain text.
Contributor
bharath_b
Posts: 19
Registered: ‎04-06-2011
My Device: TORCH 9800

Re: Blank screen when qnx components are used??

here is the code..

 

 

<?xml version="1.0" encoding="utf-8"?>
<s:View xmlns:fx="http://ns.adobe.com/mxml/2009"
        xmlns:s="library://ns.adobe.com/flex/spark" title="Home" xmlns:buttons="qnx.ui.buttons.*" creationComplete="initUI()">
    <fx:smileyvery-happy:eclarations>
        <!-- Place non-visual elements (e.g., services, value objects) here -->
    </fx:smileyvery-happy:eclarations>
    
    <fx:smileyfrustrated:cript>
        <![CDATA[
    

            import qnx.ui.buttons.LabelButton;
  
       
            var button:LabelButton;
            
            protected function initUI():void
            {
                button=new LabelButton();
                button.label="CLick Me";
                stage.addChild(button);
            }
        ]]>
    </fx:smileyfrustrated:cript>
    
</s:View>

Please use plain text.
Developer
jtegen
Posts: 6,541
Registered: ‎10-27-2010
My Device: HTC One, PlayBook, LE Z10, DE Q10

Re: Blank screen when qnx components are used??

My guess will be that "stage" is null at the time that function is called. Can you add it to the current view's display list (replace 'stage' with 'this'). Something 'created' does not mean that it has been 'added' to the parent object.
Please use plain text.
Developer
JRab
Posts: 2,462
Registered: ‎11-04-2010
My Device: Bold 9700

Re: Blank screen when qnx components are used??

hey,

 

the problem you are running into is using QNX Display Objects in Flex -- currently that is not possible unless you wrap those display objects in a MX UIComponent object. Flex uses the addElement method to add children to the view -- whereas in pure AS3 you can use the addChild method.

 

here is a post that shows you how to use the MX UIComponent wrapper to add QNX Display Objects:

 

http://supportforums.blackberry.com/t5/Tablet-OS-SDK-for-Adobe-AIR/ToggleSwitch-in-Flex/m-p/797365#M...

 

good luck!

J. Rab (Blog) (Twitter)
--
1. If you liked my post or found it useful please click on the thumbs up and provide a Like!
2. If my post solved your problem please click on the Accept as Solution button. Much appreciated!

Approved Apps: OnTrack | ssShots | Hangman
Please use plain text.