swarm-support
[Top][All Lists]
Advanced

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

Re: Command line arguments


From: Steve Emsley
Subject: Re: Command line arguments
Date: Thu, 13 Aug 1998 20:27:59 +0100

>>>>> "Marcus" == Marcus G Daniels <address@hidden> writes:

    SE> and how do I recover the value of the command line parameter
    SE> since parseKey simply returns an int.

    Marcus> You can store the values in instance variables of your
    Marcus> Arguments subclass.

In main.m I have:

  apexArgs = [APEXArguments createBegin: globalZone];
  initSwarmArguments(argc, argv, [APEXArguments class]);

which works. I get a new option as defined in the createBegin method
of the subclassed Arguments class. I'm using pretty much the same code
as your example so the instance variable protocolArg should hold a
string (a parameter file name). If I printf the argument within the
subclassed parseKey:arg: method I get the filename output as expected.

However, I've tried to access the instance variable, protocolArg using
[apexArgs getProtocolArg] and it returns (Null),  or (nil) if I print
it as a pointer. Also I when I try to access the superclass variables
such as getArgc, getAppName or getBatchModeFlag I get the Null values.

I can retrieve the parameter from argv if required.

Cheers, Steve
-- 
---------------------------------------------------------------------
 Steve Emsley                 Ecosystems Analysis & Management Group
 address@hidden              University of Warwick, England
 http://www.oikos.warwick.ac.uk/~sme/           (+44) (0)1598 753648
---------------------------------------------------------------------

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