[RQt-devel] "super" and "this" within scope of callbacks

John Verzani verzani at math.csi.cuny.edu
Wed Aug 11 18:13:25 CEST 2010


 When defining classes and setting methods (qsetClass, qsetMethod) the
environment has the object "this" and "super" available to it. Would this be
possible within a callback set by qconnect? In RGtk2 and tcltk there is a
way to get the object within the callback without having to use global
variables or pass that object in through user.data.

E.g., something like this

b <- Qt$QPushButton("click me")
qconnect(b, "pressed", function(...) print(this$text))

It is easy enough to hack qconnect to add in "this" to the environment of
the handler, but I'm not sure how "super" would be done.

-- 
John Verzani
Chair, Department of Mathematics
College of Staten Island, CUNY
verzani at math.csi.cuny.edu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/qtinterfaces-devel/attachments/20100811/96bfa23e/attachment.htm>


More information about the Qtinterfaces-devel mailing list