swarm-support
[Top][All Lists]
Advanced

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

Re: simple objc/swarm question


From: Roger M. Burkhart
Subject: Re: simple objc/swarm question
Date: Mon, 20 Nov 95 12:55:26 CST

I experimented with a subclass of the default List implementation and got
the following to work:


#import <collections/List_linked.h>

@interface MyList : List_linked
+ create: aZone;
@end

@implementation MyList

+ create: aZone
{
  List_linked  *newList;

  newList = [aZone allocIVars: [List_linked self]];
  newList->zone = aZone;
  return newList;
}

@end

{
  ...
  aList = [MyList create: aZone];
  ...
}

This is like the suggestion I made in the message yesterday (reattached
below) except that I forgot that the internal zone variable has to be set.
(Also I had the wrong #import name.)  Note that when subclassing in this
way you are *not* subclassing all the class selection logic based on
create-time "set" messages; you've already hardcoded the selection of these
in the class you've selected.  But there aren't many "set" messages on List
yet anyway; all you want is probably just a vanilla List.

I've reattached the earlier message in case some of the swarm-support
messages weren't getting through yesterday.  (I never saw my own message,
nor JJ's either if it was sent to the list.  SFI seemed to be having some
network or server problems as I was leaving there yesterday.)

Roger


----- Begin Included Message -----


reply via email to

[Prev in Thread] Current Thread [Next in Thread]