| Thread overview | ||||||||
|---|---|---|---|---|---|---|---|---|
|
June 10, 2005 Cannot "remove" from associative array | ||||
|---|---|---|---|---|
| ||||
Hello
I am getting what seems to me to be a strange error when trying to remove an element from an associative array.
The error:
noba\scene.d(46): undefined identifier remove
noba\scene.d(46): function expected before (), not remove of type int
The relevant code:
typedef int OBJECTID;
class ObjectBase
{
public void removeChild(ObjectBase o)
{
children.remove(o.id);
}
public:
ObjectBase[OBJECTID] children;
OBJECTID id;
}
Thanks in advance.
| ||||
June 11, 2005 Re: Cannot "remove" from associative array | ||||
|---|---|---|---|---|
| ||||
Posted in reply to Patrick Chasco | "Patrick Chasco" <patrick@chascosoft.com> wrote in message news:d8cse9$1rgu$1@digitaldaemon.com... > typedef int OBJECTID; > > class ObjectBase > { > public void removeChild(ObjectBase o) > { > children.remove(o.id); > } > > public: > ObjectBase[OBJECTID] children; > OBJECTID id; > } Works fine for me. Maybe you botched your upgrade to 0.126? | |||
June 12, 2005 Re: Cannot | ||||
|---|---|---|---|---|
| ||||
Posted in reply to Jarrett Billingsley | In article <d8dck3$2c58$1@digitaldaemon.com>, Jarrett Billingsley says... > >"Patrick Chasco" <patrick@chascosoft.com> wrote in message news:d8cse9$1rgu$1@digitaldaemon.com... >> typedef int OBJECTID; >> >> class ObjectBase >> { >> public void removeChild(ObjectBase o) >> { >> children.remove(o.id); >> } >> >> public: >> ObjectBase[OBJECTID] children; >> OBJECTID id; >> } > >Works fine for me. > >Maybe you botched your upgrade to 0.126? > > I had same bug with version 0.125. Upgrade to 0.126 solved it. | |||
Copyright © 1999-2021 by the D Language Foundation
Permalink
Reply