[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Q] Processing command line arguments, initSwarmAppArguments
From: |
Ken Cline |
Subject: |
Re: [Q] Processing command line arguments, initSwarmAppArguments |
Date: |
Tue, 3 Aug 1999 12:31:01 -0400 (EDT) |
On Tue, 3 Aug 1999, Norberto Eiji Nawa wrote:
> Hello:
>
> I am trying to process some command line arguments, using
> initSwarmAppArguments
> (swarm/swarmdocs-1.4.1/swarm.defobj.arguments.protocol.html), but I am
> could not figure out how to retrieve the passed arguments, after
> initSwarmAppArguments is called.
>
> Naively put, which object should call the method getMyArgument
> (equivalent to getProtocolArg in the page put above)?
There is a global singleton object called `arguments' that
should respond to `getMyArgument'. That is, you could
modify the swarmdocs example like such:
int
main (int argc, const char ** argv)
{
initSwarmArguments (argc, argv, [MySwarmAppArguments class]);
// the usual - buildObjects:, - buildActions:, -activateIn: calls
printf( "The protocol arg is `%s'.\n", [arguments getProtocolArg] );
return 0;
}
Hope that helps.
Ken.
_________________________________________________________
Ken Cline address@hidden
SAIC VOICE (410) 571-0413
Annapolis, MD FAX (301) 261-8427
==================================
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.