what is the correct way to run non javascript embedded in html using sling.

2008-05-31 Thread janandith jayawardena
Hi , Scala has an interpreter which I intend to call in the eval method of my script engine to run scripts. To check whether it's loading I did the following, I have set the mime type using "setMimeTypes" as "text/scala" and name using "setNames" as "scala" in the Script Factory. Using the exampl

Re: what is the correct way to run non javascript embedded in html using sling.

2008-05-31 Thread Felix Meschberger
Hi, Am Samstag, den 31.05.2008, 14:16 +0530 schrieb janandith jayawardena: > Hi , > > Scala has an interpreter which I intend to call in the eval method of my > script engine to run scripts. Sounds good. > To check whether it's loading I did the following, > > I have set the mime type using "s

Re: what is the correct way to run non javascript embedded in html using sling.

2008-05-31 Thread janandith jayawardena
Hi Felix , Thanks your explanation helped me a lot. There is another thing to clarify. I created a separate standalone project to test the scala Interpreter. According to what I observed the interpreter takes in the script as a string to evaluate. Therefore I guess I will have to read the script

Re: what is the correct way to run non javascript embedded in html using sling.

2008-06-01 Thread Felix Meschberger
Hi Janandith, Am Sonntag, den 01.06.2008, 01:26 +0530 schrieb janandith jayawardena: > Hi Felix , > > Thanks your explanation helped me a lot. Good. > There is another thing to clarify. > > I created a separate standalone project to test the scala Interpreter. > According to what I observed t

Re: what is the correct way to run non javascript embedded in html using sling.

2008-06-03 Thread janandith jayawardena
Hi, I think the reason is because the scala library which contains the interpreter is not correctly loading for the script to run. This is because in the launchpad I don't see the scala.tools.nsc library loaded. I can only see the following, "imported Packagesjavax.script,version=0.0.0 from Sy

Re: what is the correct way to run non javascript embedded in html using sling.

2008-06-03 Thread Felix Meschberger
Hi, The attached pom looks like the Rhino/Javascript pom, which certainly does not load/include the Scala interpreter ... The interpreter, ready-to-run, does not necessairily show in the web console. Rather it is the fact, that the interpreter is registered by the ScriptManager. I suggest you st

Re: what is the correct way to run non javascript embedded in html using sling.

2008-06-04 Thread janandith jayawardena
Hi Felix, I've created a jira issue and attached the code as scala.tar.gz till I'm able to commit to the google project. Please have a look at it. janandith.

Re: what is the correct way to run non javascript embedded in html using sling.

2008-06-05 Thread Felix Meschberger
Hi Janandith, Am Mittwoch, den 04.06.2008, 22:40 +0530 schrieb janandith jayawardena: > Hi Felix, > > I've created a jira issue and attached the code as scala.tar.gz till I'm > able to commit to the google project. Cool. Thanks. Aparently Bertrand has fixed the google codes project. Still h

Re: what is the correct way to run non javascript embedded in html using sling.

2008-06-05 Thread Bertrand Delacretaz
Hi Janandith, On Sat, May 31, 2008 at 10:46 AM, janandith jayawardena <[EMAIL PROTECTED]> wrote: > ...Scala has an interpreter which I intend to call in the eval method of my > script engine to run scripts I had a quick look at the Scala interpreter class [1], and it is probably what you nee

Re: what is the correct way to run non javascript embedded in html using sling.

2008-06-05 Thread janandith jayawardena
Hi, > IMHO you're currently struggling with two distinct problems: > 1) How to integrate a new scripting language into Sling > 2) How to run scripts/templates with Scala. You are correct Bertrand. I was trying to tackle it together at once but the way you've suggested is less confusing so I'll