473,795 Members | 2,892 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Accessing Functions in a JScript.NET assem

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.__ComObj ect). 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.val ueOf();
theFunction(); // runtime error
}

Am I not using the type converter classes properly?:

public function recieveFunction (f : Object) : void {
var theFunction : Function;
if (!TypeDescripto r.GetConverter( typeof
(Function)).IsV alid(f))
throw 0; // throw something
else
theFunction =
TypeDescriptor. GetConverter(ty peof(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

Nov 18 '05 #1
0 773

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
2005
by: alaa | last post by:
I have the following code in an ASP page but it does not seem to allow a JScript to access VBScript variables. But if a VBScript accesses a variable in declared in a JScript TAG then it seems to work. Can anyone help <SCRIPT LANGUAGE ="VBSCRIPT" RUNAT="SERVER" Dim tes test = 10 </SCRIPT><SCRIPT LANGUAGE ="JSCRIPT" RUNAT="SERVER" Response.Write(test) </SCRIPT>
1
1754
by: TopDawg044 | last post by:
I continue to lose Javascript functionality in any browser I use under WinXPPro...(IE6, Moz 1.4, NS 7.1...)it is now at the point where I'm unable to access my school sites which use jscript and has reached a critical mass (I'm gonna explode soon!) The symptoms are usually the same - when I browse to a page via jscript by clicking on a jscript link, it displays a blank page with no attempt to load content and displays the 'done' tag at...
6
6290
by: Alfred Taylor | last post by:
I'm having performance/memory problems using .NET's XslTransform class so I thought I'd give the MSXML object's a whirl. The question I haven't been able to find in these groups is can I use C# extension functions with the MSXML objects? More specifically to use a C# class which has all my extension functions. I've seen examples where the stylesheet uses the <msxsl:script> element and embeds C# code, but that's not a viable solution...
1
1701
by: kscho | last post by:
Hi~ When I make shared library with option -fPIC, the result is wrong and different that made static library. first time , I made apps with static library. code works fine. however when i make apps with shared library , it's not fine. but I must use shared library.
1
1158
by: Rashad Rivera | last post by:
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...
1
1461
by: RFS666 | last post by:
Hello together, I wanted to ask if somebody can help me with accessing a listbox (a serverside webform from the designer-toolbox) from clientside JScript. I need to add and remove values and find out about the selected index. I hope somebody can help & thanks in advance RFS666
37
3586
by: pochartrand | last post by:
Hello, Is there a way to manipulate or at least read the pseudo-class of an element ? I know the style attribute can be accessed and gives the CSS properties for a particular element. However, I can't seem to access the "hover" properties. example :
18
1670
by: Franky | last post by:
I don't know how to ask this so that someone will not misread it but here goes. At run time I want to be able to evaluate functions from the Math library, but at design time I do not know what functions will be needed. I know I can do If Userinput = "SINE" Then zz = Sin(whatever)
1
4943
by: Eran | last post by:
I am trying to hook up or get some kind of a notification event when the script engine is executing a certain JScript function. The script engine is not hosted in IE, but in an independent application. The Java script functions are declared in the following way: component.prototype.XXX = function( ... ) I have an instance of IActiveScript and tried to enumerate all the
0
9673
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10443
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10216
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9044
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7543
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6783
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5437
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5565
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4113
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.