c++ - How do I set a listener in Awesomium? ("Field type 'Listener' is an abstract class" error) -


i've been trying awesomium::webviewlistener working, whenever try allocate listener object "field type 'listener' abstract class" error.

here's code:

class listener : public awesomium::webviewlistener { public:     void oncallback(awesomium::webview* caller,                     const std::wstring& objectname,                     const std::wstring& callbackname,                     const awesomium::jsarguments& args)     {         std::cout << "hello!" << std::endl;     } };  // in gui class listener listener; // field type 'listener' abstract class view->setlistener(&listener); 

how supposed set listener if can't allocate listener-object? i've tried using boost::shared_ptr doesn't produce errors oncallback()-function never gets called.

it 2 variants:

  1. awesomium::webviewlistener contains more 1 abstract method. if - should implement them create instance of derived class `listener' (bash.d said it)
  2. awesomium::webviewlistener::oncallback arguments list should exatly equal your's one. if not so, added method listener, not implemented base abstract oncallback

Comments

Popular posts from this blog

multithreading - Exception in Application constructor -

React Native allow user to reorder elements in a scrollview list -

windows - CertCreateCertificateContext returns CRYPT_E_ASN1_BADTAG / 8009310b -