Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

NSInvocationOperation error

2 views
Skip to first unread message

aphuk

unread,
Dec 3, 2010, 2:04:58 AM12/3/10
to Help-g...@gnu.org
Hi, I am new to Objective-C and GNUstep so my question might be a little basic but please help me out since I am stuck. We are trying to create an instance of a NSInvocationOperation and put it in the NSOperationQueue as given below NSInvocationOperation* putOp = [[[NSInvocationOperation alloc] initWithTarget:self selector:@selector(put) object:[NSNumber numberWithInt:5]] autorelease]; But on compilation, I get the below error : source/Test.m:5: error: 'NSInvocationOperation' undeclared (first use in this function) What am I missing here?

View this message in context: NSInvocationOperation error
Sent from the GNUstep - Help mailing list archive at Nabble.com.

aphuk

unread,
Dec 3, 2010, 12:36:37 AM12/3/10
to Help-g...@gnu.org

Hi, I am new to Objective-C and GNUstep so my question might be a little
basic but please help me out since I am stuck.

We are trying to create an instance of a NSInvocationOperation and put it in
the NSOperationQueue as given below

NSInvocationOperation* putOp = [[[NSInvocationOperation alloc]
initWithTarget:self selector:@selector(put)
object:[NSNumber
numberWithInt:5]] autorelease];

But on compilation, I get the below error :

NSInvocationOperation undeclared (first use in this function)

What am I missing here?

--
View this message in context: http://old.nabble.com/NSInvocationOperation-error-tp30365267p30365267.html

Germán Arias

unread,
Dec 3, 2010, 1:30:23 PM12/3/10
to aphuk, Help-g...@gnu.org
Well, in the GNUstep documentation I don't see NSInvocationOperation
class. Then, I suppose this class don't exist on GNUstep.

Anindita

unread,
Dec 3, 2010, 1:49:37 PM12/3/10
to ger...@xelalug.org, Help-g...@gnu.org
Thanks for your reply.

Actually the main motivation behind using NSInvocationOperation was to
create dependent NSOperations and put them in the NSOperationQueue and
analyse the output, as part of a programming project.

Is there any other way of achieving this using GNUstep?

Richard Frith-Macdonald

unread,
Dec 3, 2010, 1:55:34 PM12/3/10
to ger...@xelalug.org, Help-g...@gnu.org

On 3 Dec 2010, at 18:30, Germán Arias wrote:

> Well, in the GNUstep documentation I don't see NSInvocationOperation
> class. Then, I suppose this class don't exist on GNUstep.
>
> On jue, 2010-12-02 at 21:36 -0800, aphuk wrote:
>> Hi, I am new to Objective-C and GNUstep so my question might be a little
>> basic but please help me out since I am stuck.
>>
>> We are trying to create an instance of a NSInvocationOperation and put it in
>> the NSOperationQueue as given below
>>
>> NSInvocationOperation* putOp = [[[NSInvocationOperation alloc]
>> initWithTarget:self selector:@selector(put)
>> object:[NSNumber
>> numberWithInt:5]] autorelease];
>>
>> But on compilation, I get the below error :
>>
>> NSInvocationOperation undeclared (first use in this function)
>>
>> What am I missing here?

Yes, this is a non-existent class. Searching the web for it, it seems it's a class from the iPhone operating system.
Looking at the documentation, it seems quite simple though ... just a simple wrapper to run an invocation as an NSOperation ... s/he could get a similar effect easily by writing a subclass of NSOperation.


0 new messages