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

Posts: 410
Registered: ‎06-03-2010
My Device: Z10 Red
My Carrier: Free
Accepted Solution

useful Signal ?

In the doc we see lots of signal like onTitleBarChanged, onContentChanged, onAction Added,... But they are not really useful since it's our code that changed the content. so we already knew it. What's the point of such signals?


On the other hand, there are very few real event/input signals. Like onButtonClicked or onTouch. How does one know if the user :

- Reached the end of a scrollview

- Just made a specific node visible by scrolling

- ...And many event we had direct or indirect access with Blackberry Java or Android





Anybody feeling the same?



Posts: 251
Registered: ‎11-22-2011
My Device: Blackberry Playbook
My Carrier: vodafone

Re: useful Signal ?

Feeling the same.

I dont think, these signals are useless, but i miss a lot of signals(events) in the most components. For example TextField.onFocus. Coming from AIR-development, i notice a huge difference too. In AIR there are so much more events available for every control.  I really hope its getting better in the next release.

Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10
My Carrier: none

Re: useful Signal ?

Just to answer the "what's the point of such signals", one point is that basically all the interesting properties are more or less automatically set up to notify on changes, so they can be used in bindings in QML. Without those "on....Changed" signals, I don't think you could create bindings with any of those properties.

Another point is that although your code changed the content, so you "already knew" about a given change, writing your code so that the code which changes something also knows about all the other things that may depend on that change is a bad practice, resulting in "brittle" and awkward designs. By relying on the on....Changed notification signals, you can set up linkages where the code responsible for changes knows nothing about the other things that care about the changes. It lets you build reusable components, have cleaner code, and simpler designs.

On the more fundamental issue, I agree we're missing many useful and important signals, and hope to see the next update improve things in that area. I think there are good (logistical) reasons why we haven't got them yet, but I have my fingers crossed we'll see more of them soon.

Note that quietly waiting to see such things arrive isn't the most effective way to ensure it happens. Make detailed lists of the specific features you want, preferably with use cases so they don't sound like a grab bag of "wouldn't it be cool if" ideas without a real-world need, and either post in the forums, write a blog post and point people there, or (best option perhaps) submit as a Feature Request in the JIRA issue tracker. If you don't wait too long to do that, you're improving the chances that the best ideas will be added before launch.

Peter Hansen -- (BB10 and dev-related blog posts at http://peterhansen.ca.)
Author of White Noise and Battery Guru for BB10 and for PlayBook | Get more from your battery!