10-03-2012 04:01 PM
Hello all. Given the error and the very basic state of this applicaiton that i am trying to create, i am going to assume that this error is rather triviall; i jsut can't seem to peg it down.
Here is my app.hpp
#include <QObject>
#include <camera/camera_api.h>
#include <bb/cascades/ImageView>
namespace bb { namespace cascades { class Application; }}
/*!
* @brief Application pane object
*
*Use this object to create and init app UI, to create context objects, to register the new meta types etc.
*/
class AppName : public QObject
{
Q_OBJECT
public:
AppName(bb::cascades::Application *app);
virtual ~AppName() {}
// coil_Base image
ImageView *mImageCoilBase;
// coil_On overlay image
ImageView *mImageCoilOn;
private:
bool setupCamera();
camera_handle_t cameraHandle;
};
#endif
And yet, i get a compile error on the ImageView objects called mImageCoilBase and mImageCoilOn.
Thoughts?
10-03-2012 04:30 PM
add
using namespace bb::cascades
10-03-2012 04:35 PM
Where exactly? That particular line is already in my CPP file.
10-03-2012 05:52 PM
You need it in the declaration where you reference ImageView. Put it right below you're other namespace statement in the .h file. You should definitely read up on C++ namespaces, they are incredibly important and you will run into this many more times if you dont know how they work or what they mean.
10-04-2012 03:40 PM
Kyle is correct. Basically, "ImageView" by itself is not a thing. "bb::cascades::ImageView" is, however. You can refer to it like that, or add "using namespsace bb::cascades" before the class declartion, which will make the compiler try and append that to any classes it doesn't recognize on their own.
Most of our sample apps do this, if you want to see it in action.