Hi Guys: You are doing things I have not done in scripting. That said, if
you can get a function or sub to execute using the timer could you then call
the function that resides inside the class manually from the high-level
function called by the timer? In other words, the timer fires and executes
some function, inside that function you manually call another function which
resides in the class. This would be a sort of "Delegate" approach. I am not
sure if you can cross-reference a function from 2 diferent running threads
but Aaron should know that one.
I have done cross-references between threads in Visual Basic and have used
"Delegates" but I am not sure how they would work under the WE Scripting
environment nor under VBS.
HTH:
Rick USA
----- Original Message -----
From: "Doug Lee" <doug....@ssbbartgroup.com>
To: <gw-scripting@gwmicro.com>
Sent: Sunday, October 11, 2009 11:28 PM
Subject: Re: help with class
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.
The event functions are called in the global context, and your class
methods are not available in that context, being inside the class.
Even more precisely, you're wanting the Timer callback to be invoked
within a particular instance object's context, which isn't even the
same as the class context. I haven't seen a way to hand Timer or
other such functions a pointer to the exact callback I want to use, if
it's not just a global symbol name.
On Sun, Oct 11, 2009 at 09:04:20PM -0400, Chip Orange wrote:
Hi all,
I'm trying to define a class, and within this class have one sub use the
startTimer method to invoke a timer to run another sub within the class.
I'm getting the error which looks like it can't find the other sub, and I
suspect there's some special syntax I'll need to use because it's inside
of
a class.
anyone got any ideas? Am I interpreting the error correctly, does this
happen when you use startTimer on a sub within a class? (the error
message
itself is misleading and non-sensical, but I can't recall it).
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