swarm-support
[Top][All Lists]
Advanced

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

Error creating objects.


From: dsumpter
Subject: Error creating objects.
Date: Thu, 16 Jan 1997 19:51:57 GMT

My debugger is claiming that line 97 of defobj/Zone.m :

    newObject = (id)malloc( aClass->instance_size );

is causing an error. As far as I can see I'm calling it in the normal
way through:

    hwall = [Wall createBegin: [self getZone]];

where createBegin is simply inheritted from SwarmObject (although as a
grandchild).

This code worked until I added a new variable to Wall's parent,
ThermoAgent (who is a child of SwarmObject). The variable was called
insulationConstant and was of type double.

i.e. the code works when ThermoAgent.h has:
@interface ThermoAgent: SwarmObject {

  .....

  // Spatial coordinates
  int x, y;                    

  // Agent type to be set at inheritted level
  char* agentType;

}

but not with:

@interface ThermoAgent: SwarmObject {

  .....
 
  // Spatial coordinates
  int x, y;                    

  // Amount of heat insulation provided by the agent
  double insulationConstant;

  // Agent type to be set at inheritted level
  char* agentType;

  .....

}

I can't think of any possible reason for this.....can anyone else?

Cheers,

David.





reply via email to

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