R
Rashad Rivera
Hi Gang,
My question is directed more towards the MS JSctip.NET
dev team. I understand that you guys are planning to
implement events in the newer versions of JS.NET, but is
there a way to work around this problem now? I thought I
could access a function in a HTA application by passing it
into a JS.NET assembly. I learned of that it in exposed in
the asm as an Object(AKA: System.__ComObject). But I am
unable to cast it to a local Function variable. I tried
using the TypeDescriptor and converting it that way, but I
keep getting compile error, (type mispatches), and other
runtime errors. The closest i get is when I cast this way:
public function recieveFunction(f : Object) : void {
var theFunction : Function = (Function)f.valueOf();
theFunction(); // runtime error
}
Am I not using the type converter classes properly?:
public function recieveFunction(f : Object) : void {
var theFunction : Function;
if (!TypeDescriptor.GetConverter(typeof
(Function)).IsValid(f))
throw 0; // throw something
else
theFunction =
TypeDescriptor.GetConverter(typeof(Function)).ConvertTo(f,
typeof(Function));
}
And for my next question, is there a way to expose the
MSHTML library in a JS.NET assembly directly. I mean
without having to write a C/VB.NET control. I know that
we can reference the lib in VB,J++ and C++ but is there a
way to do that in JS?
If this is the wrong group, and I think it may be, then
can someone direct me to the group that handles this type
of inquerry.
Any help would be appreciated
- rashad
"if you want to reply to me directly, just remove the "-
noSpamPlease" and "NOSPAM" from my address
My question is directed more towards the MS JSctip.NET
dev team. I understand that you guys are planning to
implement events in the newer versions of JS.NET, but is
there a way to work around this problem now? I thought I
could access a function in a HTA application by passing it
into a JS.NET assembly. I learned of that it in exposed in
the asm as an Object(AKA: System.__ComObject). But I am
unable to cast it to a local Function variable. I tried
using the TypeDescriptor and converting it that way, but I
keep getting compile error, (type mispatches), and other
runtime errors. The closest i get is when I cast this way:
public function recieveFunction(f : Object) : void {
var theFunction : Function = (Function)f.valueOf();
theFunction(); // runtime error
}
Am I not using the type converter classes properly?:
public function recieveFunction(f : Object) : void {
var theFunction : Function;
if (!TypeDescriptor.GetConverter(typeof
(Function)).IsValid(f))
throw 0; // throw something
else
theFunction =
TypeDescriptor.GetConverter(typeof(Function)).ConvertTo(f,
typeof(Function));
}
And for my next question, is there a way to expose the
MSHTML library in a JS.NET assembly directly. I mean
without having to write a C/VB.NET control. I know that
we can reference the lib in VB,J++ and C++ but is there a
way to do that in JS?
If this is the wrong group, and I think it may be, then
can someone direct me to the group that handles this type
of inquerry.
Any help would be appreciated
- rashad
"if you want to reply to me directly, just remove the "-
noSpamPlease" and "NOSPAM" from my address