swarm-support
[Top][All Lists]
Advanced

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

Re: subclassing/collections


From: Roger M. Burkhart
Subject: Re: subclassing/collections
Date: Sun, 23 Jun 1996 14:22:41 -0500

>    I think the problem is a little more subtle than this.
> It has to do with a method you suggested is a previous
> email to get the subgroup id.
> 
> You suggested:
> 
> subGroup=[mySchedule at (id) XXXXX];

You're right, this does not return the subgroup itself, but an action
that executes the subgroup.  It's independent of what you declare the
subGroup as: 

> I think that this may be returning the wrong type?
> When I save the subgroup id and use it directly in the
> remove message it works.  If I get the subgroup using
> the previous code I get the error.  I could also be using
> this wrong but I'm not sure how, it seems pretty straight 
> forward.  One possibility I suppose is that I need to
> use a pointer definition when I define subGroup insted
> of just:
> 
> id subGroup;
> 
> If so, what is the correct type for a subGroup?
> is it 
> 
> Schedule *subGroup?

Just id is what I'd recommend, so that you don't have to import
<activity/Schedule.h>, thus looking inside stuff that ordinary
client code should't have to.

For the time being, try to save the subgroup id if you can.
Otherwise, you for the time being you could import <activity/Schedule.h>
and declare the variable as ActionConcurrent_c *anAction and then
get the group from anAction->actionPlan.  But this is really looking
inside internals and I don't recommend for good.  I'll look at a better
way but not for at least a week with continuing travel.

Roger



reply via email to

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