Hi!

I have a program with two classes (as outlined below). From the class MyFunctions I would like to call a function in the class Protocol, is this possible? Normally one would save the instance of a class p = Protocol() and then be able to call p.some_function()...


But I don't see how this is possible because the Protocol is started as a callback. Does anyone have some suggestions?

Best regards, Håvard


class MyFunctions:
   def initiate_computation(self, code):
      // want to call Protocol.some_function(code)

class Protocol:
   def __init__(self, runtime):
      ...

   def some_function(self, code):
      ...

   def results_ready(self, results):
      ...

pre_runtime = create_runtime(id, players, 1, options, Toft07Runtime)
pre_runtime.addCallback(Protocol)
_______________________________________________
viff-devel mailing list (http://viff.dk/)
viff-devel@viff.dk
http://lists.viff.dk/listinfo.cgi/viff-devel-viff.dk

Reply via email to