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
jcnielsen
Posts: 90
Registered: ‎06-03-2009
My Device: Dev Alpha B
My Carrier: None atm.
Accepted Solution

Can't connect 'file selected'-slot. No such slot.

Hi

I am trying to connect a file selected slot, but it doesn't seem to work. I get:

 

Object::connect: No such slot CoolApp::smileysurprised:nFileSelected(const QStringList& selectedFiles) in ../src/CoolApp.cpp:73
Context: Failed to find target node with id  11
FilePickerPrivate::smileysurprised:nCardInvokeRequestFinished()  . error= 0

 

The method is there, so I don't know what QNX is complaining about.


Here is the connect statement:

    QObject::connect(filePicker,
        SIGNAL(fileSelected(const QStringList& selectedFiles)),
        this,
        SLOT(onFileSelected(const QStringList& selectedFiles)));

 

What did I do wrong? I am looking at the example here:

https://developer.blackberry.com/cascades/reference/bb__cascades__pickers__filepicker.html#canceled

 

Thanks.

 

Br
J. C. Nielsen

Attended DEVCON 2010

Free Tibet
Please use plain text.
Developer
Zmey
Posts: 1,512
Registered: ‎12-18-2012
My Device: PlayBook, Z10, DAC

Re: Can't connect 'file selected'-slot. No such slot.

Don't specify parameter names in signals and slots.

 

 

Try changing it to:

 QObject::connect(filePicker,
        SIGNAL(fileSelected(QStringList)),
        this,
        SLOT(onFileSelected(QStringList)));


Andrey Fidrya, @zmeyc on twitter
Please use plain text.
Developer
jcnielsen
Posts: 90
Registered: ‎06-03-2009
My Device: Dev Alpha B
My Carrier: None atm.

Re: Can't connect 'file selected'-slot. No such slot.

Works!

Thanks man :-)

Br
J. C. Nielsen

Attended DEVCON 2010

Free Tibet
Please use plain text.