jakarta-bsf-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ulf Dittmer <...@ulfdittmer.com>
Subject Re: general questions
Date Sat, 30 Oct 2004 22:49:17 GMT
Hi-

Maybe I misunderstand what you're trying to accomplish, but the 
instantiation and registering should only be necessary if the host app 
wants to make particular objects -which originate in the host- 
available to the script. If the objects don't have to originate in the 
host (because the host needn't access them), you should be able to 
create them in your script. How exacly that's done depends a bit on 
which scripting language you're using. Take a look at the "scriptedui" 
example that comes with BSF: the Java host registers a bean, but 
several more Java objects -which the host needn't care about- are 
instantiated in the script (e.g., ui.js for JavaScript).

Hope this helps.

Ulf

On 30.10.2004, at 23:44, Rainer Hahnekamp wrote:

> Hello everybody,
>
> I am about to write an application, which core's functionality depends 
> on BSF.
> The app uses a lot of different libraries and thats where the problem 
> begins:
> -As far as I know, your only chance to access some objects within the 
> Java
> scope you have to instantiate these objects and register them to the
> BSFManager. But what should I do, if I have here a class with static 
> methods
> that cannot be instantiated like the System class in java.lang??
> -In my application the script code needs access to the OpenOffice API, 
> which
> has - as you can surely imagine - a lot of classes. Must I really 
> instantiate
> and register all of them (they will certainly be needed in some cases) 
> or is
> there another way? If not I think that there should be a mechanism in 
> BSF
> where the script has access to all libraries in the CLASSPATH of the 
> host app
> without needing to register them.
>
> I hope you can give me some answers and thank you in advance.
>
> Greetings,
> -Rainer Hahnekamp


---------------------------------------------------------------------
To unsubscribe, e-mail: bsf-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: bsf-user-help@jakarta.apache.org


Mime
View raw message