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
Dredvard
Posts: 160
Registered: ‎01-27-2012
My Device: Playbook
My Carrier: Rogers

How far do signal propagate in QML

[ Edited ]

I had the following code that used to work.  Not sure what I modified, but it doesn't work any more. I have a series of animations that can execute.  Whenever any of the animations are complete I'm looking to send an exitComplete signal so that I can reset the animation.    I've now added a few extra default signal handler so it definitely doesn't work - just not sure how to go back.   Its a sereis of custom qml components.  How many parents upwards does a  signals propagate in QML.  Where should you position the signal handler and the signal.  Is there a way to affect the progation (eg.  adding a signal handler at one level stops propagation)? 

 

I've read this thread:

http://supportforums.blackberry.com/t5/Cascades-Development/Signal-from-one-qml-to-another/m-p/18254...

 

But doesn't state where to position things or how it propagates clearly.

 

Main.qml

Container {
    id: animContainer
    objectName: "AnimContainer"
    signal exitComplete; //signals reset animation
    animations: [
        Hyperout {
            id: hyperoutanimid
/* onEnded: { exitComplete(); console.log("animSlide hyperout onEnded") } onExitComplete: { console.log("animSlide hyperout onExitComplete") }*/ } ] TiledSlide { } onExitComplete: {
resetanim() console.log("onExit Complete***") } }

Hyperout.qml

import bb.cascades 1.0

ExitAnimation {
    ParallelAnimation {
        objectName: "Hyperout"
        RotateTransition {
            toAngleZ: 100
            duration: 1000
        }
        ScaleTransition {
            toX: .75
            toY: .05
            duration: 1000
        }
    }
}

 ExitAnimation.qml

import bb.cascades 1.0

SequentialAnimation {
    signal exitComplete()
    onEnded: {
        exitComplete();
        console.log("hyperout onEnded")
    }
}

 [Edit]  I've got it working again now by removing the  signal in Exit Animations and the onEnded and onExits in Hyperout in main, but I still would love some clarification about how the signal and signal handlers work.

---
If you find my post helpful please "like" it and "accept as a solution"
Please use plain text.
Developer
borceg
Posts: 670
Registered: ‎03-21-2012
My Device: BlackBerry PlayBook 16GB
My Carrier: Vip

Re: How far do signal propagate in QML

I don't know whether this will be of use in your case, but it provides good overview about touch propagation https://developer.blackberry.com/cascades/documentation/dev/touch/touch_propagation.html
Please use plain text.