[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
lost in gnustep first steps
From: |
reuss |
Subject: |
lost in gnustep first steps |
Date: |
Wed, 04 Jun 2003 18:24:27 GMT |
User-agent: |
Pan/0.11.2 (Unix) |
I am trying to use the gnustep classes for making a little, editable
dictionary (to use my "|" delimited vocabulary (NSDictionary is not good
for that purpose, because there are multiple records with same key), but
my first essays does not want to work as I espect. I have errors at
runtime that I don't really understand. my intention is to put a word to
a Dico object in the variable "egy". Maybe I am a complete idiot, but I
don't understand what happens (I am an absolutly beginner in objective-c - the
basic objc
seems me more clear, but i want a gui for my app),
cheers
andras
errors
-------
Jun 04 20:30:05 szotar[1501] Invalid selector addEgy: (no type information)
Jun 04 20:30:05 szotar[1501] GSFFCallInvocation.m:771 Assertion failed in
GSInvocationCallback. No signature for selector addEgy:
Uncaught exception NSInternalInconsistencyException, reason:
GSFFCallInvocation.m:771 Assertion failed in GSInvocationCallback. No
signature for selector addEgy:
dico.h
------------
#import <Foundation/NSObject.h>
#import <Foundation/NSMutableString.h>
@interface Dico: NSObject
{
NSMutableString *egy;
}
+ (id) new;
- (void) setEgy: one;
@end
dico.m
-------------
#include "dico.h"
@implementation Dico
+ (id) new
{
self=[[super alloc] init];
egy = "";
return self;
}
- (void) setEgy: (NSMutableString *)one
{
[one retain];
[egy release];
egy = one;
}
@end
main.m
------------
#import <Foundation/NSObject.h>
#import <Foundation/NSAutoreleasePool.h>
#import <Foundation/NSMutableString.h>
#import "dico.h"
void main()
{
NSAutoreleasePool *pool;
pool = [NSAutoreleasePool new];
id szotar = [Dico new];
[szotar addEgy: "nagzo ddf"];
}
- lost in gnustep first steps,
reuss <=