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: 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:Smiley SurprisednFileSelected(const QStringList& selectedFiles) in ../src/CoolApp.cpp:73
Context: Failed to find target node with id  11
FilePickerPrivate:Smiley SurprisednCardInvokeRequestFinished()  . 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
Developer
Posts: 1,524
Registered: ‎12-18-2012
My Device: Z30, Z10 LE, DevAlpha C, PlayBook

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
Developer
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