swarm-support
[Top][All Lists]
Advanced

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

Re: simpleSwarmBug 1 Question


From: Norberto Eiji Nawa
Subject: Re: simpleSwarmBug 1 Question
Date: Thu, 18 Apr 2002 17:13:05 +0900

Hi Clive,

Clive> The problem I am having is that I'm not sure what the M(step) actually
Clive> does. I know what step does, I kind of know what createActionTo does but 
I
Clive> dont know why the M() is there.

Maybe the thread 1) and the Objective-C documentation 2) below will
help you understand the working of M():

1) http://www.santafe.edu/projects/swarm/archive/list-archive.9807/0199.html

2) 
http://developer.apple.com/techpubs/macosx/Cocoa/ObjectiveC/3CoreObjC/index.html
-> Messages -> Dynamic Binding

My free interpretation is that M(someMethod) tells at execution time
which implementation someMethod should be executed according to the
type of the object that receives that message.

Eiji

ps.: I'm sending this to swarm-support, I think it is more appropriate.

Clive> Hi,
Clive> 
Clive> If you are getting this twice I'm sorry its my first post to the forum 
so 
Clive> i dont know whats going on :)
Clive> 
Clive> I will be using swarm for a project at uni so I thought I would run
Clive> through the tutorials to get a grasp of it. I have hit a small snag 
trying
Clive> to understand the buildActions function in the ModelSwarm.m
Clive> 
Clive> - buildActions
Clive> {
Clive>   // Build a simple schedule to send a "step" message to
Clive>   // the bug every time step
Clive> 
Clive>   modelSchedule = [Schedule createBegin: self];
Clive>   [modelSchedule setRepeatInterval: 1];
Clive>   modelSchedule = [modelSchedule createEnd];
Clive>   [modelSchedule at: 0 createActionTo: aBug  message: M(step)];
Clive>                                                       ^
Clive>   return self;
Clive> }
Clive> 
Clive> The problem I am having is that I'm not sure what the M(step) actually
Clive> does. I know what step does, I kind of know what createActionTo does but 
I
Clive> dont know why the M() is there.
Clive> 
Clive> If this has been covered earlier I'm sorry, I tried searching the
Clive> archives but didnt find anything.
Clive> 
Clive> Thanks,
Clive> Clive

                  ==================================
   Swarm-Support is for discussion of the technical details of the day
   to day usage of Swarm.  For list administration needs (esp.
   [un]subscribing), please send a message to <address@hidden>
   with "help" in the body of the message.



reply via email to

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