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
Contributor
Posts: 26
Registered: ‎11-10-2013
My Device: Z10
My Carrier: Dialog

What type of functions can i call from an external javascript?

[ Edited ]

In order for  a function to work from an external javascript, what requirements should it fulfill?

 

"buttonid.clicked()" works wheras "buttonid.textChanged("sometext")" does not work. clicked and textChanged both are signals associated with the Button control. Therefore how do I find out which functions would work, and which would not work.

Highlighted
Developer
Posts: 543
Registered: ‎08-31-2013
My Device: Q10, Z10LE, Nokia N950, DAB....
My Carrier: Telekom Slovakia

Re: What type of functions can i call from an external javascript?

[ Edited ]

bump 



If helped give a like. If your problem was solved mark the post as "Solution"
Portfolio: BlackBerry Nokia
Social: Twitter | Facebook
About Me / Blog DevPDA | Blog
Developer
Posts: 6,152
Registered: ‎07-05-2012
My Device: Playbook, Dev Alpha C, Z10 LE, Z30
My Carrier: Orange

Re: What type of functions can i call from an external javascript?

What parameters you can pass (if any) will be listed in the documentation...

 

http://developer.blackberry.com/native/reference/cascades/bb__cascades__abstractbutton.html#function...


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

Developer of stokLocker, Sympatico and Super Sentences.
Developer
Posts: 6,152
Registered: ‎07-05-2012
My Device: Playbook, Dev Alpha C, Z10 LE, Z30
My Carrier: Orange

Re: What type of functions can i call from an external javascript?

I think you are slightly confused about the differences between a signal and a slot, take a good read of this and you might be less confused...

 

http://developer.blackberry.com/native/documentation/cascades/dev/signals_slots/

 

textChanged is defined as a signal, and more so uses the Q_PROPERTY macro,

 

Q_PROPERTY(QString text READ text WRITE setText
                  RESET resetText NOTIFY textChanged FINAL)

 Here NOTIFY is specifying that the property 'text' has a signal associated with it called textChanged() that will pass the text string on it being changed.

 

    Q_SIGNALS:

        void textChanged(QString text);

 Read more about the Q_PROPERTY macro here...

 

http://developer.blackberry.com/native/documentation/cascades/dev/integrating_cpp_qml/

 


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

Developer of stokLocker, Sympatico and Super Sentences.