swarm-support
[Top][All Lists]
Advanced

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

pass an ivar name through as an argument to a method?


From: Paul Johnson
Subject: pass an ivar name through as an argument to a method?
Date: Tue, 07 Mar 2000 11:16:36 -0600

Agent has ivars that refer to grids, like "home" and "work".

instead of saying

-setHomeX: (int) x Y: (int) y;
and
-setWorkX: (int) x Y: (int) y;

I want a single method that takes the ivar as an argument.  I want
something like:

-setPositionGrid:  (char *) worldName X: (int) x Y: (int) y; 

But need a hint on how to pass in the ivar name and use it.  OR point me
at an example.

-- 
Paul E. Johnson                       email: address@hidden
Dept. of Political Science            http://lark.cc.ukans.edu/~pauljohn
University of Kansas                  Office: (785) 864-9086
Lawrence, Kansas 66045                FAX: (785) 864-5700

                  ==================================
   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]