I see.
I will look into the way you described:)

Thanks
hp

On Wed, 25 Aug 2010, Boriss Mejias wrote:

On 08/04/2010 04:06 PM, HP Wei wrote:


Thank you your detailed description about system-entity being sited.

Here is another related issue.

I have a class which has some methods like this:

Pr = System.showInfo

class A_class
meth {M1 P ...}
{Pr "---checking"}
{Do_something ...}
{Pr "---Status: ..."}
end
end

Hi HP,

The System module has the same semantics for distribution as the OS module. It's considered a local resource, and it will not be exported.

What you could do is to have Pr as an attribute of the object, and be able to set it dynamically. Something like

meth setPr(PrintProc)
  pr := PrintProc
end

like that, if you run the object at the machine where you created it, you will do something like:

{Obj setPr(System.show)}
{Obj doSomething}

that will make all calls to attribute 'pr' become a call to System.show. If instead you want to send the message to a remote site, one way to do it would be as follows:

{Obj setPr(proc {$ Msg}
             {Send P Msg}
          end)}

where P is the remote port where you want to send the output.

I hope it helps.
cheers
Boriss


_________________________________________________________________________________
mozart-users mailing list                               
[email protected]
http://www.mozart-oz.org/mailman/listinfo/mozart-users

Reply via email to