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
Posts: 84
Registered: ‎04-22-2013
My Device: BB 10 Dev
My Carrier: Simulator

Re: How to get number and name from Contact Picker

[ Edited ]

I tried to rename it to ContactDet.cpp & ContactDet.hpp but still getting error.

../src/ContactDet.cpp: In member function 'void ContactDet::contactDets(QString)':
../src/ContactDet.cpp:39:54: error: no matching function for call to 'bb::pim::contacts::ContactService::contactDetails(QString&)'
../src/ContactDet.cpp:39:54: note: candidates are:
C:/Users/N0189/BB/target_10_1_0_1020/qnx6/usr/include/bb/pim/contacts/ContactService.hpp:113:13: note: bb::pim::contacts::Contact bb::pim::contacts::ContactService::contactDetails(bb::pim::contacts::ContactId) const
C:/Users/N0189/BB/target_10_1_0_1020/qnx6/usr/include/bb/pim/contacts/ContactService.hpp:113:13: note:   no known conversion for argument 1 from 'QString' to 'bb::pim::contacts::ContactId {aka int}'
C:/Users/N0189/BB/target_10_1_0_1020/qnx6/usr/include/bb/pim/contacts/ContactService.hpp:635:13: note: bb::pim::contacts::Contact bb::pim::contacts::ContactService::contactDetails(bb::pim::contacts::AccountId, bb::pim::contacts::ContactId) const
C:/Users/N0189/BB/target_10_1_0_1020/qnx6/usr/include/bb/pim/contacts/ContactService.hpp:635:13: note:   candidate expects 2 arguments, 1 provided
../src/ContactDet.cpp:39:10: warning: unused variable 'contact' [-Wunused-variable]
cc: C:/Users/N0189/BB/host_10_1_0_132/win32/x86/usr/lib/gcc/arm-unknown-nto-qnx8.0.0eabi/4.6.3/cc1plus caught signal 1
make[2]: *** [o.le-v7-g/.obj/ContactDet.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: Leaving directory `C:/Users/N0189/ndk-10.1.0-workspace/HLB/arm'
make[1]: *** [debug] Error 2
make[1]: Leaving directory `C:/Users/N0189/ndk-10.1.0-workspace/HLB/arm'
make: *** [Device-Debug] Error 2
Highlighted
Developer
Posts: 84
Registered: ‎04-22-2013
My Device: BB 10 Dev
My Carrier: Simulator

Re: How to get number and name from Contact Picker

oops i forgot that it should be passed as an int instead of string.

It works now.

Thanks.