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
likian
Posts: 30
Registered: ‎01-28-2014
My Device: BlackBerry Z10
My Carrier: Swisscom

Please help! main.cpp

Hi there!

 

Please, please help me!

 

In my main.ccp the part "new ApplicationUI(&app);" is red underlined and the mouse hover says that a ";" is missing, but it doesn't make a difference if you set one or not. When I want to run the app on my phone it says that the "program file does not exist".

 

What can I do now?

 

Thank you so so so much!!!

Likian

Please use plain text.
Developer
SumiGhosh
Posts: 435
Registered: ‎09-20-2011
My Device: Z10 LE, Playbook, DevAlpha C, 9900, 9380
My Carrier: Vodafone

Re: Please help! main.cpp

Post your full code of main.cpp 

 

Version of momentics ide you are using.

Please use plain text.
BlackBerry Development Advisor (Retired)
garydev
Posts: 83
Registered: ‎10-10-2012
My Device: Z30
My Carrier: Bell

Re: Please help! main.cpp

likian,

 

Did you solve your problem?  Please advise.

 

-g

Please use plain text.
Developer
likian
Posts: 30
Registered: ‎01-28-2014
My Device: BlackBerry Z10
My Carrier: Swisscom

Re: Please help! main.cpp

Hi there!
Sorry for the daly, but I can't send you the code now. I will send it as fast as possible (12-24h). Thank you for your support!
Likian
Please use plain text.
BlackBerry Development Advisor
sabdelsayed
Posts: 249
Registered: ‎08-17-2012
My Device: BlackBerry Z10 and Q10
My Carrier: Bell

Re: Please help! main.cpp

Hi likian,

 

I recommend you start a new clean project in Momentics.

 

To do so, go to File->New->BlackBerry Project -> application -> Cascades -> Next -> Standard Empty Project . Afterwards, simply import to this new project your assets and custom classes.  This will ensure that main.cpp and the applicationui class are working correctly.

@SamarAbdelsayed

Did this answer your question? Please accept post as solution.
Please refrain from posting new questions in solved threads.
Found a bug? Report it using the Issue Tracker
Please use plain text.
Developer
likian
Posts: 30
Registered: ‎01-28-2014
My Device: BlackBerry Z10
My Carrier: Swisscom

Re: Please help! main.cpp

@SumiGhosh

Here's the main.cpp code:

 

#include <QLocale>
#include <QTranslator>

#include <bb/cascades/Application>
#include <bb/cascades/QmlDocument>
#include <bb/cascades/AbstractPane>

using namespace bb::cascades;

Q_DECL_EXPORT int main(int argc, char **argv)
{
Application app(argc, argv);

// Create the Application UI object, this is where the main.qml file
// is loaded and the application scene is set.
new ApplicationUI(&app);

// Enter the application main event loop.
return Application::exec();
}

 

 

Momentics Version: 2.0

 

 

@SamarAbdelsayed

 

Thank you, I already tried this. The app works fine but the problem is that BlackBerry Appworld doesn't accept is as an update for my already existing app. Could I change this?

 

Kind regards

Likian

 

Thank you

Please use plain text.
BlackBerry Development Advisor
sabdelsayed
Posts: 249
Registered: ‎08-17-2012
My Device: BlackBerry Z10 and Q10
My Carrier: Bell

Re: Please help! main.cpp

Oh, that could be a signing issue. Are you using the same signing keys to sign the updated version of your app?

@SamarAbdelsayed

Did this answer your question? Please accept post as solution.
Please refrain from posting new questions in solved threads.
Found a bug? Report it using the Issue Tracker
Please use plain text.
Developer
likian
Posts: 30
Registered: ‎01-28-2014
My Device: BlackBerry Z10
My Carrier: Swisscom

Re: Please help! main.cpp

Yes, I do. The problem is when I copy the assets and the main.qml to a new project. With the old one an update would work, but the app doesn't work because of the main.cpp

 

Likian

Please use plain text.
BlackBerry Development Advisor (Retired)
garydev
Posts: 83
Registered: ‎10-10-2012
My Device: Z30
My Carrier: Bell

Re: Please help! main.cpp

What version of the NDK are you using?

 

gary

Please use plain text.
Developer
likian
Posts: 30
Registered: ‎01-28-2014
My Device: BlackBerry Z10
My Carrier: Swisscom

Re: Please help! main.cpp

It's 10.2 (is it the one you can chosse when you build a new project?)

Please use plain text.