Object Self Reference?
homeeman
11 Mar 2013, 05:32There wouldn't happen to be a way for objects to reference themselves in Quest, like the "this" pointer in C++, would there? That would make life so much easier.

Pertex
11 Mar 2013, 07:08But there is a this pointer in Quest

jaynabonne
11 Mar 2013, 10:21If a script attribute is invoked on an object with "do", then there is a "this" reference while the script is running. (If a script is invoked with a bare "invoke", then there is no "this".) You also get a 'this" if you use delegates.
Unfortunately, I think there are still cases within Quest where "invoke" is used instead of "do" (e.g. when using script dictionaries). I had opened a bug for it, but I'm not sure if it was ever fixed (by adding a "this" parameter into the "invoke" call).
Unfortunately, I think there are still cases within Quest where "invoke" is used instead of "do" (e.g. when using script dictionaries). I had opened a bug for it, but I'm not sure if it was ever fixed (by adding a "this" parameter into the "invoke" call).
homeeman
12 Mar 2013, 06:49Excellent, I did not know that! Thanks to you both, life just got easier.