Also, I have tried the code from this thread as well.
And both will not compile.
I am working on an electron project and incidentally I tried compiling for a photon and it worked???
Maybe calling member class functions is not supported on the electron?