On 25/03/2007, at 2:24 AM, Octave Julien wrote:

> Thanks to you, Andy, and to Kiam for your answers. I find that  
> having a
> single object as a script's context is an annoying limitation.

It is a safety issue - I would rather have control over the  
boundaries of the sandbox than be worried about shipping stuff where  
there are opportunities to exploit more access. Considering the long  
history of bugs in scripting interfaces that allow more access, I'm  
much happier with RB.

> I've set it to the app itself
I wouldn't.

You're relying on the user not finding that fact out and you're  
adding a lot of unused functions and properties to the context. If  
there is any overhead or chance of problems as a result of this being  
a broader interface then you are pushing your luck. You may also be  
increasing the compile time for scripts - I don't know of any side  
effects but I would test it, if you really needed to do so.

> it involves writing many methods to create an
> interface between RBScript and the other objects accessible to the
> user.

You may want to rethink your design then. Why does one particular  
script require such a broad interface - could the logic be broken  
down into multiple scripts?

Don't forget that the RBScript receives a chunk of text which might  
not be just what the user enters - a common technique is to include  
your own class definitions or variable declarations before the user  
script.

regards

Andy
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to