Inherit from NSObject, not Object.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@198 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Andrew McCallum 1995-03-23 04:09:55 +00:00
parent 02e64e5e84
commit f06901aa8b
4 changed files with 12 additions and 12 deletions

View file

@ -57,7 +57,7 @@ struct myarray {
@end @end
#endif #endif
@interface Server : Object <ServerProtocol,InvalidationListening> @interface Server : NSObject <ServerProtocol,InvalidationListening>
{ {
id theList; id theList;
} }

View file

@ -198,7 +198,7 @@
int main() int main()
{ {
id l = [[Server alloc] init]; id l = [[Server alloc] init];
id o = [[Object alloc] init]; id o = [[NSObject alloc] init];
double d; double d;
Connection *c; Connection *c;

View file

@ -11,13 +11,13 @@ int main()
for (i = 0; i < N; i++) for (i = 0; i < N; i++)
{ {
[array addObject:[[Object alloc] init]]; [array addObject:[[[NSObject alloc] init] autorelease]];
} }
[array makeObjectsPerform:@selector(name)]; [array makeObjectsPerform:@selector(name)];
[[array objectAtIndex:0] hash]; [[array objectAtIndex:0] hash];
[[array releaseObjects] release]; [array release];
printf("no errors\n"); printf("no errors\n");
exit(0); exit(0);
} }

View file

@ -20,11 +20,11 @@ int main ()
a = [Array new]; a = [Array new];
[a prependObject: [Object new]]; [a prependObject: [NSObject new]];
[a prependObject: [Object new]]; [a prependObject: [NSObject new]];
[a prependObject: [Object new]]; [a prependObject: [NSObject new]];
printf("count: %d\n", [a count]); printf("count: %d\n", [a count]);
[a insertObject: [Object new] atIndex: 2]; // ok! [a insertObject: [NSObject new] atIndex: 2]; // ok!
printf("count: %d\n", [a count]); printf("count: %d\n", [a count]);
c = [[CircularArray alloc] initWithType:@encode(int)]; c = [[CircularArray alloc] initWithType:@encode(int)];
@ -34,11 +34,11 @@ int main ()
[c insertElement:0 atIndex:2]; // core dump! [c insertElement:0 atIndex:2]; // core dump!
q = [Queue new]; q = [Queue new];
[q enqueueObject: [Object new]]; [q enqueueObject: [NSObject new]];
[q enqueueObject: [Object new]]; [q enqueueObject: [NSObject new]];
[q enqueueObject: [Object new]]; [q enqueueObject: [NSObject new]];
printf("count: %d\n", [q count]); printf("count: %d\n", [q count]);
[q insertObject: [Object new] atIndex: 2]; // core dump! [q insertObject: [NSObject new] atIndex: 2]; // core dump!
printf("count: %d\n", [q count]); printf("count: %d\n", [q count]);
return 0; return 0;
} }