|
I keep getting this error and I haven't a clue as to why; other than it has to do with this script. Please help me understand why this is happening
(comments are locked)
|
|
I'm not certain that is all there is to it but :
should probably be:
A "Cannot cast from source to destination type" is well... an invalid-cast error. In other words, you're trying to reference an incorrect type into a type-restricted variable. For examples:
would - I believe - all throw the exception. Note that JScript allow for dynamic casting, such as:
would - I believe - never throw the exception, though errors might arise later. Just to note, that's not dynamic casting, that's type inference. It's not limited to JS; C# also does that (the last few lines would compile as-is in C#). It infers the type from the value supplied when the variable is declared, but you can't change the type later, so it's not dynamic. Doing "
Apr 27 '11 at 05:44 AM
Eric5h5
Ah thank you! you were absolutely right about that part. Now I just need to figure out why my tag won't work.
Apr 27 '11 at 05:47 AM
MK7
(comments are locked)
|
