www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - No ZipArchive property 'opApply'

reply a.c.edwards <a.c.edwards_member pathlink.com> writes:
The following example taken from the documentation does not compile. What am I
doing wrong?

|void main()
|{
|  ZipArchive archive = new ZipArchive(read("94410.zip"));
|  foreach (ArchiveMember am; archive) // line 9
|  {
|      writefln("member name is ", am.name);
|  }
|  
|}

ERROR MSG:

z.d(9): no property 'opApply' for type 'std.zip.ZipArchive'
z.d(9): function expected before (), not 1 of type int

Thanks,
Andrew
Jun 04 2005
parent Thomas Kuehne <thomas-dloop kuehne.this-is-spam.cn> writes:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

a.c.edwards schrieb am Sun, 5 Jun 2005 06:41:48 +0000 (UTC):
 The following example taken from the documentation does not compile. What am I
 doing wrong?

|void main()
|{
|  ZipArchive archive = new ZipArchive(read("94410.zip"));
|  foreach (ArchiveMember am; archive) // line 9
foreach (ArchiveMember am; archive.directory){
|  {
|      writefln("member name is ", am.name);
|  }
|  
|}

 ERROR MSG:

 z.d(9): no property 'opApply' for type 'std.zip.ZipArchive'
 z.d(9): function expected before (), not 1 of type int
Thomas -----BEGIN PGP SIGNATURE----- iD8DBQFCo4QS3w+/yD4P9tIRAih6AKDHVtDNiebfHfQDqUArMbXC9HnzqQCfQuZ9 zFVu2kP/hN3J39NkMoE+XsE= =9QUI -----END PGP SIGNATURE-----
Jun 05 2005