Re: Support for invoking methods in scripts

2008-03-11 Thread Carsten Ziegeler
Felix Meschberger wrote: Invocable is an interface, which is generally implemented by a ScriptEngine, so adapting a Script to Invocable is comparable to adapt it to a ScriptEngine and I would not do that. Yes, adapting to ScriptEngine is not a good idea, that's why I thought of just allowing In

Re: Support for invoking methods in scripts

2008-03-11 Thread Felix Meschberger
Mon, 10 Mar 2008 14:08:30 > To:sling-dev@incubator.apache.org > Subject: Re: Support for invoking methods in scripts > > > Hi all, > > Am Montag, den 10.03.2008, 09:39 +0100 schrieb Carsten Ziegeler: > > Bertrand Delacretaz wrote: > > > Hi Carsten, > > >

Re: Support for invoking methods in scripts

2008-03-11 Thread Felix Meschberger
Hi all, Am Dienstag, den 11.03.2008, 11:06 +0100 schrieb Carsten Ziegeler: > Rethinking, I think we should make these two changes: > a) Add the return value to the eval() method +1 > b) Make SlingScript adaptable and allow to adapt it to > javax.script.Invocable [1]. > > The only (minor) drawb

Re: Support for invoking methods in scripts

2008-03-11 Thread Carsten Ziegeler
Carsten Ziegeler wrote: Felix Meschberger wrote: First, I think the SlingScript interface provides a nice abstraction to integrate with the Servlet/Script execution mechanism and taking the burden of acquiring a ScriptEngine off the shoulders of developers. Having said that, lets start about a

Re: Support for invoking methods in scripts

2008-03-10 Thread Carsten Ziegeler
Felix Meschberger wrote: First, I think the SlingScript interface provides a nice abstraction to integrate with the Servlet/Script execution mechanism and taking the burden of acquiring a ScriptEngine off the shoulders of developers. Having said that, lets start about a reduction of the API in

Re: Support for invoking methods in scripts

2008-03-10 Thread Felix Meschberger
Hi, Am Montag, den 10.03.2008, 18:31 +0100 schrieb Carsten Ziegeler: > >> b) We need a convention to pass the method name and the method > >> parameters to the script engine > >> c) Check for the new info mentioned in b) and if available don't execute > >> the whole script, but just the single m

Re: Support for invoking methods in scripts

2008-03-10 Thread Carsten Ziegeler
Felix Meschberger wrote: The ScriptEngine.eval method already is defined to return an Object. We just would have to forward this value. Yepp. b) We need a convention to pass the method name and the method parameters to the script engine c) Check for the new info mentioned in b) and if availa

Re: Support for invoking methods in scripts

2008-03-10 Thread padraic hannon
should be supported. Yours, Paddy Sent via BlackBerry by AT&T -Original Message- From: Felix Meschberger <[EMAIL PROTECTED]> Date: Mon, 10 Mar 2008 14:08:30 To:sling-dev@incubator.apache.org Subject: Re: Support for invoking methods in scripts Hi all, Am Montag, den 10.03.2

Re: Support for invoking methods in scripts

2008-03-10 Thread Felix Meschberger
Hi all, Am Montag, den 10.03.2008, 09:39 +0100 schrieb Carsten Ziegeler: > Bertrand Delacretaz wrote: > > Hi Carsten, > > > > On Wed, Mar 5, 2008 at 3:23 PM, Carsten Ziegeler <[EMAIL PROTECTED]> wrote: > >> ...If you think of scripting parts of your application it might be > >> useful to group s

Re: Support for invoking methods in scripts

2008-03-10 Thread Bertrand Delacretaz
On Mon, Mar 10, 2008 at 9:39 AM, Carsten Ziegeler <[EMAIL PROTECTED]> wrote: > ... I think to support this we just need some minor changes: > a) the eval method of the SlingScript needs a return value (Object) > b) We need a convention to pass the method name and the method > parameters to the

Re: Support for invoking methods in scripts

2008-03-10 Thread Carsten Ziegeler
Bertrand Delacretaz wrote: Hi Carsten, On Wed, Mar 5, 2008 at 3:23 PM, Carsten Ziegeler <[EMAIL PROTECTED]> wrote: ...If you think of scripting parts of your application it might be useful to group several methods into one script (for instance a javascript script) and execute exactly one meth

Re: Support for invoking methods in scripts

2008-03-10 Thread Bertrand Delacretaz
Hi Carsten, On Wed, Mar 5, 2008 at 3:23 PM, Carsten Ziegeler <[EMAIL PROTECTED]> wrote: > ...If you think of scripting parts of your application it might be > useful to group several methods into one script (for instance a > javascript script) and execute exactly one method out of this script...

Re: Support for invoking methods in scripts

2008-03-06 Thread Philipp Koch
hi, this is something i already missed and i think could be useful in apps that use the script support for executing kind of business logic (e.g. workflow, forms validation, rules engine) which of course would expect a return value. regards, philipp On 3/5/08, Carsten Ziegeler <[EMAIL PROTECTED]>

Support for invoking methods in scripts

2008-03-05 Thread Carsten Ziegeler
Hi, the current script support is able to invoke a script and give back a result. If you think of scripting parts of your application it might be useful to group several methods into one script (for instance a javascript script) and execute exactly one method out of this script. WDYT? Carst