Hi,
I used to assign function names to variables like
var processDataFunction = myProcessData;
where myProcessData is something like
function myProcessData()
{
}
Now I need to group all javascript functions to a JScript class like
package myPackage
{
class myClass
{
var processDataFunction = myProcessData;
function myProcessData()
{
}
}
}
But, I am getting runtime exception in the line
var processDataFunction = myProcessData;
Can a function be assigned to a var in this way? Any other ideas?
Thanks,
Surya
bruce barker - 11 Jun 2004 17:29 GMT
no.
in classic javascript, all functions were actually object contructors. in
javascript.net there are two worlds, stadalone function work as before, but
functiion declared in a class are true .net methods, and have different
rules. you need to use a delegate in your case (.net approach).
-- bruce (sqlwork.com)
> Hi,
>
[quoted text clipped - 29 lines]
>
> Surya