digitalmars.D - Cannot "remove" from associative array
- Patrick Chasco <patrick chascosoft.com> Jun 10 2005
- "Jarrett Billingsley" <kb3ctd2 yahoo.com> Jun 10 2005
- KUV <KUV_member pathlink.com> Jun 12 2005
- Mike Parker <aldacron71 yahoo.com> Jun 12 2005
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.
Jun 10 2005
"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?
Jun 10 2005
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.
Jun 12 2005
KUV wrote:I had same bug with version 0.125. Upgrade to 0.126 solved it.
It's not a bug. remove() was added to aa's in 0.126, and did not exist in previous versions.
Jun 12 2005








Mike Parker <aldacron71 yahoo.com>