Hi Davor, Dirk. Thanks a lot for your help. I tried the way Dirk are suggesting and it appears to work fine. The application at all is not working yet, i don't know exactly what is happening, so i did a consultation to the NOMAD developer. But i believe that the problem of using the R object into a method is solved.
Please, find attached a simplified example of the code. If you see something weird, please don't hesitate in writing to the list. Best regards. César Davor Cubranic <[email protected]> Enviado por: [email protected] 17/03/2011 07:51 p.m. Para Dirk Eddelbuettel <[email protected]> cc [email protected] Asunto Re: [Rcpp-devel] R Embedded in a class function On 2011-03-17, at 3:31 PM, Dirk Eddelbuettel wrote: > | And it so happens that I just wrote an example of instantiating RInside and > | passing to Qt so that you'd get 'R inside Qt'. That is now in SVN for > | RInside but I haven't even gotten around to writing a short blog post about > | it. Maybe on the weekend... > > I forgot to give the URL: > > https://r-forge.r-project.org/scm/viewvc.php/pkg/inst/examples/qt/?root=rinside > But your code still creates R instance in "main", which it then passes to the QtDensity instance (a subclass of QtMainWindow). OTOH, once the R instance is stored as a member variable of QtDensity, it *is* used in QtDensity's methods. But I'm quibbling -- it's a good pattern to follow, so Cesar could perhaps just adapt it to his code. Davor _______________________________________________ Rcpp-devel mailing list [email protected] https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel
embedRinAmethodv2.cpp
Description: Binary data
_______________________________________________ Rcpp-devel mailing list [email protected] https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel
