See later messages in this thread. Basically, and as I feared, the "me" we have won't help, because it also is not available in the required global context.
So delegates will remain necessary for this scenario. As Ron said though, you can at least pass the "me" object to the delegator, so you can get true instance method callbacks even if indirectly. On Mon, Oct 12, 2009 at 09:33:28PM -0400, Chip Orange wrote: -----Original Message----- From: Ron Parker [mailto:r...@gwmicro.com] Sent: Monday, October 12, 2009 8:21 AM To: gw-scripting@gwmicro.com Subject: Re: help with class Doug Lee wrote: > I would dearly love to be proven wrong on this one, but I don't > believe VBScript lets you use a class method as an event function. > Well, then, prepare to be proven wrong. In Window-Eyes 7.1 and later, you can pass a string like "MyObjectInstance.MyMethod" as the callback to functions that let you pass a function name as a string. That includes StartTimer, Queue, ConnectEvent, Dialog, Menu, and some others. Obviously, this only works with ActiveScript clients. If you want to do it with .net clients, you'll have to use a delegate. For C++ and VB 6 clients, you're on your own; you'll have to simulate delegate functionality somehow. (That probably means creating a shim object that exposes an IDispatch interface to WE and passes any calls on that interface on to the object method you wanted to delegate them to.) thanks Ron; this is very good to know, but I don't think it helps my situation does it? I'm inside a method of the class, trying to get the timer to call another method inside the class, and so I don't have the object reference to work with as you did in your example. does vbscript have a self referential object such as "thos." or "me." which would let me do this? thanks. Chip -- Doug Lee, Senior Accessibility Programmer SSB BART Group - Accessibility-on-Demand mailto:doug....@ssbbartgroup.com http://www.ssbbartgroup.com "While they were saying among themselves it cannot be done, it was done." --Helen Keller