Hello,
using this information I wanted to do the following:
Create a stationary instance of a class (let's call it MyClass) on a remote
site (thanks to the code you've given me earlier in another topic: "Sending
classes to a remote site"). This is the instance creation code line:
T={CreateRemoteStationaryObject MyClass init()}
This class' init method uses an init method from another class (MySupClass)
from which it also inherits its features (class MyClass from MySupClass).
In this class' init method (MySupClass) I want to use OS.something (OS.rand
for example) to fill this class' features. Can I do this?Thanks, I really appreciate the help you're always willing to offer. 2010/9/5 Wolfgang Meyer <[email protected]> > Hi, > > to use a sited module, you have to make sure that you use a local > module instance, i.e. a version of OS that has been linked on the > running site. > To achieve this, code is packaged in a functor with its dependencies. > An example: > This code won't work because it uses a remote "OS": > > declare > functor RemoteCode > export R > define > R = {OS.rand} > end > > RM = {New Remote.manager init} > AF = {RM apply(RemoteCode $)} > {RM close} > {Show AF.r} > > > But this code will work, because it uses a locally imported "OS": > > declare > functor RemoteCode > import OS %% This line is the only difference > export R > define > R = {OS.rand} > end > > RM = {New Remote.manager init} > AF = {RM apply(RemoteCode $)} > {RM close} > {Show AF.r} > > So you have to package the class in a functor and make sure that this > functor is applied or linked on the remote site where the class > instance is running. > > Hope this helps, > Wolfgang > > > On Sun, Sep 5, 2010 at 12:58 PM, Khadija EL MAHRSI > <[email protected]> wrote: > > Hello, > > Correct me if I'm wrong, after some research I came to the conclusion > that > > since OS is sited it is not possible to achieve the idea I had so instead > I > > will have the result of OS.something passed to this class as parameter > > through a method. > > Thanks. > > > > 2010/9/4 Khadija EL MAHRSI <[email protected]> > >> > >> Hello, > >> I was wondering if it is possible to have a class running on a remote > site > >> execute OS.(something) and put the result in a feature of this class > (like > >> self.x=OS.rand for example). > >> Thanks > > > > > > > _________________________________________________________________________________ > > mozart-users mailing list > > [email protected] > > http://www.mozart-oz.org/mailman/listinfo/mozart-users > > > > _________________________________________________________________________________ > mozart-users mailing list > [email protected] > http://www.mozart-oz.org/mailman/listinfo/mozart-users >
_________________________________________________________________________________ mozart-users mailing list [email protected] http://www.mozart-oz.org/mailman/listinfo/mozart-users
