[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: lost in gnustep first steps
From: |
Chris B. Vetter |
Subject: |
Re: lost in gnustep first steps |
Date: |
Wed, 4 Jun 2003 11:51:24 -0700 |
On Wed, 04 Jun 2003 18:24:27 GMT
reuss <reuss@chello.hu> wrote:
[...]
I wouldn't use NSMutableString, but then again I don't know what you
have in mind. So a quick fix would be:
> dico.h
> ------------
[...]
> @interface Dico: NSObject
> {
> NSMutableString *egy;
> }
> + (id) new;
> - (void) setEgy: one;
> @end
- (void) setEgy: (NSMutableString *) one;
> dico.m
> -------------
> #include "dico.h"
> @implementation Dico
> + (id) new
> {
> self=[[super alloc] init];
> egy = "";
> return self;
> }
- (id) init
{
if( (self = [super init]) )
{
egy = @"";
return self;
}
return nil;
}
> main.m
> ------------
[...]
> void main()
> {
> NSAutoreleasePool *pool;
> pool = [NSAutoreleasePool new];
> id szotar = [Dico new];
> [szotar addEgy: "nagzo ddf"];
> }
void main(void)
{
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
Dico *szotar = [[Dico alloc] init];
[szotar setEgy: @"nagzo ddf"];
[szotar release];
[pool release];
}
Since there is no -addEgy: specified anywhere, the runtime cannot find a
signature for it (though I wonder why the compiler didn't barf about it)
but since you have a -setEgy: ...
--
Chris