problem getting arguments for perform:withArguments:

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

problem getting arguments for perform:withArguments:

mattfuchs
I am trying to get information out of an island using signal:withArguments: to
an outside object waiting with perform:withArguments:

More precisely I have a tObject with a tFarRef and some outside object,  obj.

I do

obj runScript: #selector when: {tFarRef . #msg}.

and then have a perform:withArguments: method for obj.

Later tObject is called with:

self signal: #msg withArguments: #('1234').

obj's perform:withArguments: method gets called with #selector, but
withArguments gets #().

The doc seems to say this is the only way to get info out of an island, but
it's not getting any info out. How do I get information from tObject to obj?

Thanks,

Matthew
Reply | Threaded
Open this post in threaded view
|

Re: problem getting arguments for perform:withArguments:

Georg Köster
Hi Matthew,

I sent a tutorial some time back - it shows a 'framework' for the input/output to the island. I forwarded you the mail separately.

The mechanism is not easy or simple, but it works.

Hope that helps!
Georg

On Fri, Apr 25, 2008 at 9:38 AM, <[hidden email]> wrote:
I am trying to get information out of an island using signal:withArguments: to
an outside object waiting with perform:withArguments:

More precisely I have a tObject with a tFarRef and some outside object,  obj.

I do

obj runScript: #selector when: {tFarRef . #msg}.

and then have a perform:withArguments: method for obj.

Later tObject is called with:

self signal: #msg withArguments: #('1234').

obj's perform:withArguments: method gets called with #selector, but
withArguments gets #().

The doc seems to say this is the only way to get info out of an island, but
it's not getting any info out.  How do I get information from tObject to obj?

Thanks,

Matthew

Reply | Threaded
Open this post in threaded view
|

Re: problem getting arguments for perform:withArguments:

mattfuchs
Georg:

Thanks for your reply, but that wasn't actually my problem.  After carefully
following the debugger I realized that:
1) the selector name is expected to end in a colon (:)
2) the name should be followed by a list of arguments giving the number of
arguments the receiver is expecting.  Each arg name should start with a colon.

So, to get two arguments, my selector should have been something like:

#msg::a:b

Actually, the system doesn't really examine the arg names, so it could just as
easily be:

#msg:::

I actually looked at the code counting the colons.  I suspected this was a noob
question.

Matthew

-------------------------

Hi Matthew,

I sent a tutorial some time back - it shows a 'framework' for the input/output
to the island. I forwarded you the mail separately.

The mechanism is not easy or simple, but it works.

Hope that helps!
Georg

On Fri, Apr 25, 2008 at 9:38 AM, <[hidden email]> wrote:

    I am trying to get information out of an island using signal:withArguments:
to
    an outside object waiting with perform:withArguments:

    More precisely I have a tObject with a tFarRef and some outside object,
obj.

    I do

    obj runScript: #selector when: {tFarRef . #msg}.

    and then have a perform:withArguments: method for obj.

    Later tObject is called with:

    self signal: #msg withArguments: #('1234').

    obj's perform:withArguments: method gets called with #selector, but
    withArguments gets #().

    The doc seems to say this is the only way to get info out of an island, but
    it's not getting any info out.  How do I get information from tObject to
obj?

    Thanks,

    Matthew
Reply | Threaded
Open this post in threaded view
|

Re: problem getting arguments for perform:withArguments:

Georg Köster
Hi Mtthew,

thanks for letting the rest of us know - that is definitely something for the 'noteworthy'-rubrique.

Sorry that my earlier mail wasn't all that helpful.

Good luck going forward!
Georg

On Sun, Apr 27, 2008 at 5:21 AM, <[hidden email]> wrote:
Georg:

Thanks for your reply, but that wasn't actually my problem.  After carefully
following the debugger I realized that:
1) the selector name is expected to end in a colon (:)
2) the name should be followed by a list of arguments giving the number of
arguments the receiver is expecting.  Each arg name should start with a colon.

So, to get two arguments, my selector should have been something like:

#msg::a:b

Actually, the system doesn't really examine the arg names, so it could just as
easily be:

#msg:::

I actually looked at the code counting the colons.  I suspected this was a noob
question.

Matthew

-------------------------

Hi Matthew,

I sent a tutorial some time back - it shows a 'framework' for the input/output
to the island. I forwarded you the mail separately.

The mechanism is not easy or simple, but it works.

Hope that helps!
Georg

On Fri, Apr 25, 2008 at 9:38 AM, <[hidden email]> wrote:

   I am trying to get information out of an island using signal:withArguments:
to
   an outside object waiting with perform:withArguments:

   More precisely I have a tObject with a tFarRef and some outside object,
obj.

   I do

   obj runScript: #selector when: {tFarRef . #msg}.

   and then have a perform:withArguments: method for obj.

   Later tObject is called with:

   self signal: #msg withArguments: #('1234').

   obj's perform:withArguments: method gets called with #selector, but
   withArguments gets #().

   The doc seems to say this is the only way to get info out of an island, but
   it's not getting any info out.  How do I get information from tObject to
obj?

   Thanks,

   Matthew