When I compile my code I get the following warning: (sorry for horizontal scroll)
warning: 'bool CloudClass::subscribe(const char*, void (T::*)(const char*, const char*), T*) [with T = CloudManager]' is deprecated: Beginning with 0.8.0 release, Particle.subscribe() will require event scope to be specified explicitly. Define PARTICLE_USING_DEPRECATED_API macro to avoid this warning. [-Wdeprecated-declarations]
Particle.subscribe("hook-response/getGoogleDocs", &CloudManager::getGoogleDocsResponseHandler, this);
I have tried replacing “this” with “MY_DEVICES” but that will not compile.
Does anyone know the “proper” way to construct a subscription method in a class?
Then it would be good to show what exactly the compile chokes up about this
Also how have you worded this?
Replacing this whith MY_DEVICES is definetly not the way. this is the pointer that references the "self" instance of the object and MY_DEVICES is no such pointer.
Adding MY_DEVICES instead of replacing “this” with it was the way to go. Thanks!
Wondering if there’s additional documentation other than the docs for Particle.subscribe(). Is there a place to go that spells out all the ways it can be called?