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: 813
Registered: ‎05-29-2012
My Device: see later
My Carrier: see later

No such slot ApplicationUI::onClosedHandler()

https://developer.blackberry.com/native/reference/cascades/bb__cascades__dialog.html

 

trying to implement that

 

Dialog* pMyDialog = Dialog::create()
                    .content(Container::create())
                    .onClosed(this, SLOT(onClosedHandler())
                    .open();
 
first i get an error on paranthesis, so i added a parenthesis at the end of oncloseD(THIS, SLOT(ONB...()))
 
SECOND I GET THE EROR in the title. how can i sho a dialog with a message?
Developer
Posts: 6,152
Registered: ‎07-05-2012
My Device: Playbook, Dev Alpha C, Z10 LE, Z30
My Carrier: Orange

Re: No such slot ApplicationUI::onClosedHandler()

Have you actually defined that slot in your header?

 

Can you post the header file.


If you've been helped click on Like Button, if you've been saved buy the app. Smiley Happy

Developer of stokLocker, Sympatico and Super Sentences.
Developer
Posts: 813
Registered: ‎05-29-2012
My Device: see later
My Carrier: see later

Re: No such slot ApplicationUI::onClosedHandler()

/*
 * Copyright (c) 2011-2013 BlackBerry Limited.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#ifndef ApplicationUI_HPP_
#define ApplicationUI_HPP_

#include <QObject>
#include <QString>
#include <bb/cascades/NavigationPane>
namespace bb
{
namespace cascades
{
class Application;
class LocaleHandler;
}
}

class QTranslator;

/*!
 * @brief Application object
 *
 *
 */

class ApplicationUI : public QObject
{
	Q_OBJECT
public:
	ApplicationUI(bb::cascades::Application *app);
	virtual ~ApplicationUI() { }
	static bb::cascades::NavigationPane* myNavi;
	public slots:
	void onReplyAuthorizationFinished();
	Q_INVOKABLE
		void readAuthorization(QVariant);
	private slots:
	void onSystemLanguageChanged();
	private:
	QTranslator* m_pTranslator;
	bb::cascades::LocaleHandler* m_pLocaleHandler;
};

#endif /* ApplicationUI_HPP_ */

 

Developer
Posts: 813
Registered: ‎05-29-2012
My Device: see later
My Carrier: see later

Re: No such slot ApplicationUI::onClosedHandler()

how can i set a message on the dialog box aswell?
Developer
Posts: 6,152
Registered: ‎07-05-2012
My Device: Playbook, Dev Alpha C, Z10 LE, Z30
My Carrier: Orange

Re: No such slot ApplicationUI::onClosedHandler()

Right so in the header file under private slots you need to define your slot and then write that function in your C++ file.

 


If you've been helped click on Like Button, if you've been saved buy the app. Smiley Happy

Developer of stokLocker, Sympatico and Super Sentences.
Developer
Posts: 6,152
Registered: ‎07-05-2012
My Device: Playbook, Dev Alpha C, Z10 LE, Z30
My Carrier: Orange

Re: No such slot ApplicationUI::onClosedHandler()

For the message you could put a Label within the Container but why not use one of the already predefined ways of showing a Dialog with a message...

 

http://developer.blackberry.com/native/documentation/cascades/ui/dialogs_toasts/


If you've been helped click on Like Button, if you've been saved buy the app. Smiley Happy

Developer of stokLocker, Sympatico and Super Sentences.