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
New Contributor
Posts: 7
Registered: ‎02-06-2012
My Device: Dev Alpha B
My Carrier: Rogers
Accepted Solution

ContactPicker Signal for Multiple ContactSelectionMode Does Not Exist

When I attempt to connect the "contactsSelected" signal from the ContactPicker to my own slot, I get:

"Object::connect: No such signal bb::cascades::smileytongue:ickers::ContactPicker::contactsSelected(QList<int> &)"

 

QObject::connect(_contactPicker,
	       SIGNAL(contactsSelected(QList<int> &)),
	       this,
	       SLOT(onContactsSelected(QList<int> &)));

 

However, when I change the ContactPicker ContactSelectionMode to "Single" and connect the "contactSelected" signal to my slot, it works fine (Contact is not plural in this signal).

 

This is the reference I used: 

http://developer.blackberry.com/cascades/reference/bb__cascades__pickers__contactpicker.html#functio...

 

Is it possible the documentation for the signal name is incorrect? 

Developer
Posts: 1,523
Registered: ‎12-18-2012
My Device: Z30, Z10 LE, DevAlpha C, PlayBook

Re: ContactPicker Signal for Multiple ContactSelectionMode Does Not Exist

Hi,

 

Try declaring the slot as

    void onContactsSelected(const QList<int> &contactIds);

 Change the connect to:

	QObject::connect(_contactPicker, SIGNAL(contactsSelected(QList<int>)),
	                 this, SLOT(onContactsSelected(QList<int>)));

 


Andrey Fidrya, @zmeyc on twitter