473,387 Members | 1,757 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Microsoft.JScript

Hi there,

as I need to share a .NET context with a JavaScript context and I can't
re-write Rhino in C# ;-) I'trying to understand something about the
Microsoft.JScript namespace, but - really - I'm getting in *deep*
troubles: the documentation is not-so-well written (missing examples,
snippets, references, details and so on) so: can anyone:
1) Explain in 12-words ;-) *what* is Microsoft.JScript and *how* can I
use its classes;
2) link me to a tutorial or any other resource ("for dummies", of course);-)

Thanks in advance!

Cheers,
Giulio - Italia

--
OnAir: Pain of Salvation - Spitfall
Feb 6 '07 #1
6 3259
JScript is Microsoft's "server-side" .NET, strongly typed implementation of
Javascript. It is fully .NET CLR compliant. Not sure what you mean about the
sharing of contexts, if your "Javascript context" means "client script" then
this won't do it - it doesn't run like interpreted Javascript in the browser.
Peter

--
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
Short urls & more: http://ittyurl.net


"Giulio Petrucci" wrote:
Hi there,

as I need to share a .NET context with a JavaScript context and I can't
re-write Rhino in C# ;-) I'trying to understand something about the
Microsoft.JScript namespace, but - really - I'm getting in *deep*
troubles: the documentation is not-so-well written (missing examples,
snippets, references, details and so on) so: can anyone:
1) Explain in 12-words ;-) *what* is Microsoft.JScript and *how* can I
use its classes;
2) link me to a tutorial or any other resource ("for dummies", of course);-)

Thanks in advance!

Cheers,
Giulio - Italia

--
OnAir: Pain of Salvation - Spitfall
Feb 6 '07 #2
"Giulio Petrucci" <gi*************@thisisafakedomain.comwrote in message
news:O$**************@TK2MSFTNGP03.phx.gbl...
Hi there,

as I need to share a .NET context with a JavaScript context and I can't re-write Rhino in
C# ;-) I'trying to understand something about the Microsoft.JScript namespace, but -
really - I'm getting in *deep* troubles: the documentation is not-so-well written (missing
examples, snippets, references, details and so on) so: can anyone:
1) Explain in 12-words ;-) *what* is Microsoft.JScript and *how* can I use its classes;
2) link me to a tutorial or any other resource ("for dummies", of course);-)

Thanks in advance!

Cheers,
Giulio - Italia

--
OnAir: Pain of Salvation - Spitfall

You might get better answers when posting to: microsoft.public.dotnet.languages.Jscript

Willy.

Feb 6 '07 #3
Hi Willy,

Willy Denoyette [MVP] ha scritto:
You might get better answers when posting to:
microsoft.public.dotnet.languages.Jscript
I'll try.
Anyway: I don't need informations about the JScript language, but about
the classes of the Microsoft.JScript namespace.

Thanks for your suggestion,
Giulio
Feb 6 '07 #4
"Giulio Petrucci" <gi*************@thisisafakedomain.comwrote in message
news:ux**************@TK2MSFTNGP04.phx.gbl...
Anyway: I don't need informations about the JScript language, but about
the classes of the Microsoft.JScript namespace.
Google is your friend:
http://www.google.co.uk/search?hl=en...amespace&meta=

The first match returned looks pretty useful, as it's entitled
"Microsoft.JScript Namespace" and describes every class in it... :-)
Feb 6 '07 #5
Mark Rae ha scritto:
Google is your friend:
yep, anyway as I told before, the msdn documentation about this
namespace is quite unuseful.

Bye,
Giulio
Feb 6 '07 #6
Hi Peter,

Peter Bromberg [C# MVP] ha scritto:
Not sure what you mean about the
sharing of contexts, if your "Javascript context" means "client script" then
this won't do it - it doesn't run like interpreted Javascript in the browser.
I don't need to use any browser, don't worry ;-)
Let me explain better the scenario I'm currently dealing with. I have an
application with it's own context (implemented with a class called
ApplicationContext, could it be a good solution?) with some variables
and so on. Let's say[1]:

int foo = 3;
string bar = "this_is_bar";

Within this context there are some conditions defined by the user with
some javascript code: when they're executed the application can use them
as logical seitches (i.e. if such a condition is true, then do
something, else do something else). Moreover, user can define some
JavaScript functions that can be called within those conditions. Let's
suppose I have this function:

function f(a)
{
return a*a;
}

and a condition using this function, let's say:

function condition_1()
{
if (bar=="this_is_bar")
return f(foo);
else return foo;
}

as you could see in these scripts the user has defined some "logical"
using elements (foo,bar) belonging to the application context; moreover
there are cross-references between these scripts. If I use a dynamic
JScript compilation (and I won't talk about the loss of performance that
it brings). So I should implement something to make this JavaScript
context "talk" with my .NET application, and allow cross-reference
across the same JavaScript context.
Any suggestion?

Thanks in advance,
Giulio

--
[1] : actually I mapped all the variables to instances of a Variable
class I defined, that allow application to treat variables as they're
dynamic (or a sort of). So I actually have:

Variable foo = new Variable(3);
Variable bar = new Variable("this_is_bar");

In this way I can create assembly compiling dinamically the js code,
adding functions (invoked by reflection) taking objects as parameter
just to update the variables values as those Variable objects are
changed. In this way, i.e. compiling each js function into an assembly I
cannot use cross-referece, so I actually have *no* js context. So i
thought to compile all the functions within the same assembly. It's
functional but not so elegant. Moreover the dynamic compilation takes a
looooooooooooooooooong time ;-)
Feb 6 '07 #7

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

Similar topics

4
by: Bill Cousert | last post by:
I have a Windows Form that uses the Microsoft WebBrowser control. If I load an HTML file into the control that contains Jscript code, can the Jscript code call a C# function in my Windows Form? ...
0
by: bB | last post by:
I am calling an external dll (compiled JScript) from within a try/catch/finally block in a C# program and am unable to catch exceptions being raised in the JScript dll by having a specific...
39
by: tydbowl | last post by:
I have a problem where the below code chunk causes handle leaks on some machines. The leak APPEARS to be handles to the registry key: HKCU\Software\Microsoft\Windows\CurrentVersion\Internet...
102
by: Xah Lee | last post by:
i had the pleasure to read the PHP's manual today. http://www.php.net/manual/en/ although Pretty Home Page is another criminal hack of the unix lineage, but if we are here to judge the quality...
7
by: VK | last post by:
Something *big* is cooking: the entire Microsoft JScript section is down: <http://msdn.microsoft.com/library/default.asp?url=/library/en-us/script56/html/js56jslrfjscriptlanguagereference.asp> ...
14
by: Xah Lee | last post by:
sometimes in the last few months, apparently Microsoft made changes to their JavaScript documentation website: ...
2
by: namewitheldbyrequest | last post by:
I created a web service that includes the statement: using Microsoft.JScript; so I can use the eval methods. The Web Service won't build: Error 1 The type or namespace name 'JScript' does...
13
by: VK | last post by:
04.01.07 Redmond, WA Today it was officially announced that Microsoft is planning to discontinue client-side JScript support effective 10.08.07 The engine will be blocked and removed on the...
3
by: suganya | last post by:
Hi Some professionals already has developed the project using menu. In my company, they have given me task to clear the error in that. It is a script file named as "menubarAPI4.js" which is kept...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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,...

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.