swarm-support
[Top][All Lists]
Advanced

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

Re: Set_c createEnd problem


From: Roger M. Burkhart
Subject: Re: Set_c createEnd problem
Date: Fri, 6 Dec 1996 08:06:47 -0600

Bohdan -- in translating from your Set_c to Set, I kept too much of your
declaration:

> > Your code should work if you change it from:
> > 
> > >   Set_c * aSet;
> > > 
> > >   aSet = [Set_c createBegin: [self getZone]];
> > >   [aSet createEnd];
> > 
> > to:
> > 
> >     Set  aSet;
> >  
> >     aSet = [Set createBegin: [self getZone]];
> >     aSet = [aSet createEnd];   // aSet could be a new id, in some versions

> I get a parse error at the - (Set *) line.
> It all seems that Set is not being found.
> 
> Any suggestions?

The code should actually be:

> >     id  aSet;
> >  
> >     aSet = [Set createBegin: [self getZone]];
> >     aSet = [aSet createEnd];   // aSet could be a new id, in some versions

Since "Set" is just a "factory object" to create an instance, we don't publish
a specific class name, since there's no guarantee that it is a specific class.
You should just use the generic id type instead.  You shouldn't need to access
any internal instance variables anyway, since there's no published guarantee
of the class(es) that implement the behavior of the Set type (and upcoming
library versions will definitely see some change there).

Hope this finally gets everything right for you.

Roger


reply via email to

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