swarm-support
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

acreateAction with arguments


From: Koichiro Hajiri
Subject: acreateAction with arguments
Date: Sun, 09 Jun 1996 21:21:05 +0900

Hi. This is my first mail to swarm-support. It's nice to
mail to all of you.

And I have a question about ActionGroup.

Now I'm trying to send multiple arguments using
createAction** method in -buildActions. Like,

[modelActions createActionForEach: agentList
        message: $(aMethod:) :(id)sendingInfo :(id)agentList];

the definition of aMethod is like this.

-aMethod: (id)sendingInfo AgentList: (id)agentList {
id member, index; 

data1 = [sendingInfo getData];
index = [agentList begin: [self getZone]];
while((member = [index next])){
    data2 = [member getData];
    //do somethin' with data1 and data2
    .....
}

I've read documents and found that M() is a simple macro of
@selector, and document says that to send a augument, insted
of [createActionTo: aTurtle message: M(print)]; , do like
[createActionTo: aTurtle message: $m(move:) : (id)10]; .  But
I have not studied the detail of @selector yet, so I can't get
it.

How can I describe createAction** with multiple arguments?
Please teach me.

Thanks in advance.

--------
   Koichiro Hajiri
   Dept.4, ATR Media Integration & Communications Research Laboratories
   2-2 Hikaridai, Seikacho, Sorakugun, Kyoto, 619-02 JAPAN
   E-mail:      address@hidden
   FAX:         +81-774-95-1408
   TEL:         +81-774-95-1486
   WWW:         http://www.mic.atr.co.jp/~hajiri/


reply via email to

[Prev in Thread] Current Thread [Next in Thread]