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: 29
Registered: ‎04-03-2013
My Device: BB10
My Carrier: Simulator

How to declare Applicaton for mainWindow?

[ Edited ]

 

Hi All,

 

I refering to this code -> 

http://supportforums.blackberry.com/t5/Cascades-Development/Copy-current-screen-image-to-file/m-p/23...

 

I received the error when i built it , "'Application' has not been declared"

I included this "#include <bb/cascades/Window>" and " #include <bb/cascades/Application>" , it doesn't work 

 

how to declare Application?

 

I received it at the line of --> screen_read_window(Application::instance()->mainWindow()->handle(), screenshot_buf, 0, NULL ,0);

 

Thanks.