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

Native Development

Reply
Developer
babakar
Posts: 696
Registered: ‎05-29-2012
My Device: see later
My Carrier: see later

delegate 10.0

import bb.cascades 12

 

delegate: Delegate {
            id: tabDelegate
            source: "Summary.qml"
        }

 

 

This is not available in 1.0?" inside tab?

Please use plain text.
Developer
BBSJdev
Posts: 5,948
Registered: ‎07-05-2012
My Device: Playbook, Z10 LE, Dev Alpha C
My Carrier: Orange

Re: delegate 10.0

No Delegate is only available from 10.2 onwards.


If you've been helped click on Like Button, if you've been saved buy the app. :smileyhappy:

Developer of stokLocker, Sympatico and Super Sentences.
Please use plain text.
Developer
babakar
Posts: 696
Registered: ‎05-29-2012
My Device: see later
My Carrier: see later

Re: delegate 10.0

people use 10.0 still right?

So I have no choice but right it this way

Summary
{
}

inside my tabs...it will take lot data
Please use plain text.
Developer
BBSJdev
Posts: 5,948
Registered: ‎07-05-2012
My Device: Playbook, Z10 LE, Dev Alpha C
My Carrier: Orange

Re: delegate 10.0

You can still create ech tab page dynamically...

 

http://developer.blackberry.com/native/documentation/cascades/best_practices/dynamic_qml/


If you've been helped click on Like Button, if you've been saved buy the app. :smileyhappy:

Developer of stokLocker, Sympatico and Super Sentences.
Please use plain text.
Developer
babakar
Posts: 696
Registered: ‎05-29-2012
My Device: see later
My Carrier: see later

Re: delegate 10.0

how can I do it inside a tab?

 

 Tab {
        title: "Tab 1"
          
        content: Page {
            content: Label {
                text: "This is tab 1."
            }
        }
    } 

 

How can I load that dynamically?

Please use plain text.
Developer
slashkyle
Posts: 798
Registered: ‎10-16-2012
My Device: Red Z10, Dev Alpha C
My Carrier: Telus

Re: delegate 10.0

inside the pages root container setup attached objects, place your containers inside component definitions

then onCreationCompleted load the definition into a variant then add that variant to the root container (or where desired)

Page {
   Container {
    id: root
    property variant dynamic1
    property variant dynamic2

    attachedObjects: [
         ComponentDefinition {
                Container {
                      id: dynamicContent1
                }
         },
         ComponentDefinition {
               QmlFileName {
                      id: customDynamicContainer
                      //use the File name of your separate qml file
               }
       }
 
   ]

   onCreationCompleted: {
      if (!root.dynamic1){
          root.dynamic1 = dynamicContent1.createObject(root)
//(root) ensures destruction with root container root.add(dynamic1); } } } }

 

Please use plain text.