home *** CD-ROM | disk | FTP | other *** search
/ Chip 2000 May / Chip_2000-05_cd1.bin / zkuste / Perl / ActivePerl-5.6.0.613.msi / 䆊䌷䈹䈙䏵-䞅䞆䞀㡆䞃䄦䠥 / _cfb61d4f722e866c6a253ded6b8bf058 < prev    next >
Text File  |  2000-03-23  |  5KB  |  121 lines

  1.  
  2. <HTML>
  3. <HEAD>
  4. <TITLE>Win32::OLE::Enum - OLE Automation Collection Objects</TITLE>
  5. <LINK REL="stylesheet" HREF="../../../../Active.css" TYPE="text/css">
  6. <LINK REV="made" HREF="mailto:">
  7. </HEAD>
  8.  
  9. <BODY>
  10. <TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=100%>
  11. <TR><TD CLASS=block VALIGN=MIDDLE WIDTH=100% BGCOLOR="#cccccc">
  12. <STRONG><P CLASS=block> Win32::OLE::Enum - OLE Automation Collection Objects</P></STRONG>
  13. </TD></TR>
  14. </TABLE>
  15.  
  16. <A NAME="__index__"></A>
  17. <!-- INDEX BEGIN -->
  18.  
  19. <UL>
  20.  
  21.     <LI><A HREF="#name">NAME</A></LI><LI><A HREF="#supportedplatforms">SUPPORTED PLATFORMS</A></LI>
  22.  
  23.     <LI><A HREF="#synopsis">SYNOPSIS</A></LI>
  24.     <LI><A HREF="#description">DESCRIPTION</A></LI>
  25.     <UL>
  26.  
  27.         <LI><A HREF="#functions/methods">Functions/Methods</A></LI>
  28.     </UL>
  29.  
  30.     <LI><A HREF="#authors/copyright">AUTHORS/COPYRIGHT</A></LI>
  31. </UL>
  32. <!-- INDEX END -->
  33.  
  34. <HR>
  35. <P>
  36. <H1><A NAME="name">NAME</A></H1>
  37. <P>Win32::OLE::Enum - OLE Automation Collection Objects</P>
  38. <P>
  39. <HR>
  40. <H1><A NAME="supportedplatforms">SUPPORTED PLATFORMS</A></H1>
  41. <UL>
  42. <LI>Windows</LI>
  43. </UL>
  44. <HR>
  45. <H1><A NAME="synopsis">SYNOPSIS</A></H1>
  46. <PRE>
  47.     my $Sheets = $Excel->Workbooks(1)->Worksheets;
  48.     my $Enum = Win32::OLE::Enum->new($Sheets);
  49.     my @Sheets = $Enum->All;</PRE>
  50. <PRE>
  51.     while (defined(my $Sheet = $Enum->Next)) { ... }</PRE>
  52. <P>
  53. <HR>
  54. <H1><A NAME="description">DESCRIPTION</A></H1>
  55. <P>This module provides an interface to OLE collection objects from
  56. Perl.  It defines an enumerator object closely mirroring the
  57. functionality of the IEnumVARIANT interface.</P>
  58. <P>Please note that the <A HREF="#item_Reset"><CODE>Reset()</CODE></A> method is not available in all implementations
  59. of OLE collections (like Excel 7).  In that case the Enum object is good
  60. only for a single walk through of the collection.</P>
  61. <P>
  62. <H2><A NAME="functions/methods">Functions/Methods</A></H2>
  63. <DL>
  64. <DT><STRONG><A NAME="item_new">Win32::OLE::Enum-><CODE>new($object)</CODE></A></STRONG><BR>
  65. <DD>
  66. Creates an enumerator for $object, which must be a valid OLE collection
  67. object.  Note that correctly implemented collection objects must support
  68. the <CODE>Count</CODE> and <CODE>Item</CODE> methods, so creating an enumerator is not always
  69. necessary.
  70. <P></P>
  71. <DT><STRONG><A NAME="item_All">$Enum-><CODE>All()</CODE></A></STRONG><BR>
  72. <DD>
  73. Returns a list of all objects in the collection.  You have to call
  74. $Enum-><A HREF="#item_Reset"><CODE>Reset()</CODE></A> before the enumerator can be used again.  The previous
  75. position in the collection is lost.
  76. <P>This method can also be called as a class method:</P>
  77. <PRE>
  78.         my @list = Win32::OLE::Enum->All($Collection);</PRE>
  79. <P></P>
  80. <DT><STRONG><A NAME="item_Clone">$Enum-><CODE>Clone()</CODE></A></STRONG><BR>
  81. <DD>
  82. Returns a clone of the enumerator maintaining the current position within
  83. the collection (if possible).  Note that the <A HREF="#item_Clone"><CODE>Clone</CODE></A> method is often not
  84. implemented.  Use $Enum-><A HREF="#item_Clone"><CODE>Clone()</CODE></A> in an eval block to avoid dying if you
  85. are not sure that Clone is supported.
  86. <P></P>
  87. <DT><STRONG><A NAME="item_Next">$Enum->Next( [$count] )</A></STRONG><BR>
  88. <DD>
  89. Returns the next element of the collection.  In a list context the optional
  90. $count argument specifies the number of objects to be returned.  In a scalar
  91. context only the last of at most $count retrieved objects is returned.  The
  92. default for $count is 1.
  93. <P></P>
  94. <DT><STRONG><A NAME="item_Reset">$Enum-><CODE>Reset()</CODE></A></STRONG><BR>
  95. <DD>
  96. Resets the enumeration sequence to the beginning.  There is no guarantee that
  97. the exact same set of objects will be enumerated again (e.g. when enumerating
  98. files in a directory).  The methods return value indicates the success of the
  99. operation.  (Note that the <A HREF="#item_Reset"><CODE>Reset()</CODE></A> method seems to be unimplemented in some
  100. applications like Excel 7.  Use it in an eval block to avoid dying.)
  101. <P></P>
  102. <DT><STRONG><A NAME="item_Skip">$Enum->Skip( [$count] )</A></STRONG><BR>
  103. <DD>
  104. Skip the next $count elements of the enumeration.  The default for $count is 1.
  105. The functions returns TRUE if at least $count elements could be skipped.  It
  106. returns FALSE if not enough elements were left.
  107. <P></P></DL>
  108. <P>
  109. <HR>
  110. <H1><A NAME="authors/copyright">AUTHORS/COPYRIGHT</A></H1>
  111. <P>This module is part of the Win32::OLE distribution.</P>
  112. <TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=100%>
  113. <TR><TD CLASS=block VALIGN=MIDDLE WIDTH=100% BGCOLOR="#cccccc">
  114. <STRONG><P CLASS=block> Win32::OLE::Enum - OLE Automation Collection Objects</P></STRONG>
  115. </TD></TR>
  116. </TABLE>
  117.  
  118. </BODY>
  119.  
  120. </HTML>
  121.