swarm-support
[Top][All Lists]
Advanced

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

using variable in [Class create: aZone]


From: Joseph & Kathleen Villa
Subject: using variable in [Class create: aZone]
Date: Fri, 07 Jan 2000 15:28:04 -0800

Greetings!

I hope this is an easy one: I'd like to have an object's class selected during it's creation using a variable. Something like:

- (id) createAnObject: (const char*) argClass
{
        id mObject;
        mObject = [argClass create: [self getZone]];
        return mObject;
}

This is clearly a no-no, since I get the following error during compilation:

address@hidden/swarm-2.0.1/cassian/system] $ make
gcc -c -g -O2 -Wall -Wno-import -Wno-protocol -Werror -DAPPNAME=cassian -DAPPV
ERSION=2.0  -DDLL -I/Swarm-2.0.1/include WorkGroupExec.m
cc1obj.exe: warnings being treated as errors
WorkGroupExec.m: In function `-[WorkGroupExec processHiringRequestInfile]':
WorkGroupExec.m:185: warning: invalid receiver type `char  []'
WorkGroupExec.m:185: invalid use of non-lvalue array
WorkGroupExec.m:185: invalid use of non-lvalue array
make: *** [WorkGroupExec.o] Error 1

QUESTIONS: Do I need to do something to make my string argument into a valid class declaration? (Similar to using sel_get_uid(argSelector) where argSelector is a const char*?)

Thanks!

Joseph.

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