Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/air 51 asdocs #112

Merged
merged 3 commits into from
Feb 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
127 changes: 123 additions & 4 deletions static/reference/actionscript/3.0/Array.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="style.css" type="text/css" media="screen">
<link rel="stylesheet" href="print.css" type="text/css" media="print">
<meta content="Array,CASEINSENSITIVE,DESCENDING,NUMERIC,RETURNINDEXEDARRAY,UNIQUESORT,length,concat,every,filter,forEach,indexOf,join,lastIndexOf,map,pop,push,reverse,shift,slice,some,sort,sortOn,splice,insertAt,removeAt,toString,toLocaleString,unshift" name="keywords">
<meta content="Array,CASEINSENSITIVE,DESCENDING,NUMERIC,RETURNINDEXEDARRAY,UNIQUESORT,length,concat,every,filter,forEach,indexOf,join,lastIndexOf,map,pop,push,reverse,shift,slice,some,sort,sortOn,splice,insertAt,removeAt,toString,toLocaleString,unshift,includes,isEmpty" name="keywords">
<title>Array (ActionScript 3.0)</title>
<script type="text/javascript" src="AC_OETags.js"></script>
</head>
Expand Down Expand Up @@ -236,6 +236,16 @@
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#includes()">includes</a>(item:<a href="specialTypes.html#*">*</a>):<a href="Boolean.html">Boolean</a>
</div>
<div class="summaryTableDescription">

Checks whether the array includes the item that is passed in.</div>
</td><td class="summaryTableOwnerCol">Array</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#indexOf()">indexOf</a>(searchElement:<a href="specialTypes.html#*">*</a>, fromIndex:<a href="int.html">int</a> = 0):<a href="int.html">int</a>
</div>
<div class="summaryTableDescription">
Expand All @@ -255,6 +265,16 @@
Insert a single element into an array.</div>
</td><td class="summaryTableOwnerCol">Array</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#isEmpty()">isEmpty</a>():<a href="Boolean.html">Boolean</a>
</div>
<div class="summaryTableDescription">

Checks whether the array is empty.</div>
</td><td class="summaryTableOwnerCol">Array</td>
</tr>
<tr class="hideInheritedMethod">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol"><img class="inheritedSummaryImage" title="Inherited" alt="Inherited" src="images/inheritedSummary.gif"></td><td class="summaryTableSignatureCol">
<div class="summarySignature">
Expand Down Expand Up @@ -1259,6 +1279,61 @@
</div>
<p></p>
</div>
<a name="includes()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">includes</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code><a href="statements.html#AS3">AS3</a> function includes(item:<a href="specialTypes.html#*">*</a>):<a href="Boolean.html">Boolean</a></code>
<p></p>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td valign="top" style="white-space:nowrap"><b>Language version:&nbsp;</b></td><td>ActionScript 3.0
</td>
</tr>
</table>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td valign="top" style="white-space:nowrap"><b>Runtime version:&nbsp;</b></td><td>AIR&nbsp;51.0

</td>
</tr>
</table>
<p></p><p>

Checks whether the array includes the item that is passed in.

Each element is checked in turn to see if it matches the item that is passed in,

using the standard comparison operator (i.e. similar to <code>if (array[0] == item)</code>).

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

May be better array[i]

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea

Copy link

@Adolio Adolio Feb 23, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isn't more like <code>if (array.indexOf(item) != -1)</code> ?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or simply array.indexOf(item) != -1

Copy link
Contributor Author

@ajwfrost ajwfrost Feb 23, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, it isn't (having just checked the implementation!). In includes we are using the normal comparison operator, so basically iterating through and using array[i] == item. But the indexOf function uses the strict equality operator, so would be more like using array[i] === item.

That potentially raises the question whether the implementation of includes is correct i.e. which would actually be more useful! So e.g. for:

var s : String = "1";
var i : uint = 1;

we would have

(s == i); // true
(s === i); // false

because the normal equality operator tries to convert/promote primitive types to match each other, so this would essentially do s === String(i)



</p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">item</span>:<a href="specialTypes.html#*">*</a></code> &mdash; The item to be checked if it is in the array.


</td>
</tr>
</table>
<p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code><a href="Boolean.html">Boolean</a></code> &mdash;
True if the item is found in this array.





</td>
</tr>
</table>
</div>
<a name="indexOf()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
Expand Down Expand Up @@ -1396,6 +1471,50 @@
</tr>
</table>
</div>
<a name="isEmpty()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">isEmpty</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code><a href="statements.html#AS3">AS3</a> function isEmpty():<a href="Boolean.html">Boolean</a></code>
<p></p>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td valign="top" style="white-space:nowrap"><b>Language version:&nbsp;</b></td><td>ActionScript 3.0
</td>
</tr>
</table>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td valign="top" style="white-space:nowrap"><b>Runtime version:&nbsp;</b></td><td>AIR&nbsp;51.0

</td>
</tr>
</table>
<p></p><p>

Checks whether the array is empty.

An alternative to calling a comparison <code>array.length == 0</code>.


</p><p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code><a href="Boolean.html">Boolean</a></code> &mdash;
True if the array has no elements.





</td>
</tr>
</table>
</div>
<a name="join()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
Expand Down Expand Up @@ -3513,11 +3632,11 @@
<p></p>
<div class="feedbackLink">
<center>
<a href="mailto:[email protected]?subject=ASLR Feedback(Wed Sep 28 2022, 6:12 PM GMT+01:00) : Array">Submit Feedback</a>
<a href="mailto:[email protected]?subject=ASLR Feedback(Mon Feb 12 2024, 3:03 PM GMT) : Array">Submit Feedback</a>
</center>
</div>
<center class="copyright"> &copy; 2004-2022 Adobe Systems Incorporated. All rights reserved. <br>Wed Sep 28 2022, 6:12 PM GMT+01:00<br> <a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/3.0/"><img alt="Creative Commons License" style="border-width:0" src="https://i.creativecommons.org/l/by-nc-sa/3.0/80x15.png" /></a> </center>
<center class="copyright"> &copy; 2004-2022 Adobe Systems Incorporated. All rights reserved. <br>Mon Feb 12 2024, 3:03 PM GMT<br> <a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/3.0/"><img alt="Creative Commons License" style="border-width:0" src="https://i.creativecommons.org/l/by-nc-sa/3.0/80x15.png" /></a> </center>
</div>
</body>
</html>
<!-- &copy; 2004-2022 Adobe Systems Incorporated. All rights reserved. Wed Sep 28 2022, 6:12 PM GMT+01:00 <a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/3.0/"><img alt="Creative Commons License" style="border-width:0" src="https://i.creativecommons.org/l/by-nc-sa/3.0/80x15.png" /></a> -->
<!-- &copy; 2004-2022 Adobe Systems Incorporated. All rights reserved. Mon Feb 12 2024, 3:03 PM GMT <a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/3.0/"><img alt="Creative Commons License" style="border-width:0" src="https://i.creativecommons.org/l/by-nc-sa/3.0/80x15.png" /></a> -->
51 changes: 43 additions & 8 deletions static/reference/actionscript/3.0/Function.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="style.css" type="text/css" media="screen">
<link rel="stylesheet" href="print.css" type="text/css" media="print">
<meta content="Function,apply,call" name="keywords">
<meta content="Function,declaration,apply,call" name="keywords">
<title>Function (ActionScript 3.0)</title>
<script type="text/javascript" src="AC_OETags.js"></script>
</head>
Expand Down Expand Up @@ -54,7 +54,9 @@
</table>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td valign="top" style="white-space:nowrap"><b>Runtime version:&nbsp;</b></td><td></td>
<td valign="top" style="white-space:nowrap"><b>Runtime version:&nbsp;</b></td><td>AIR&nbsp;1.0

</td>
</tr>
</table>
<p></p>
Expand Down Expand Up @@ -88,7 +90,7 @@
<a onclick="javascript:setInheritedVisible(true,'Property');" href="#propertySummary" class="showHideLink"><img alt="Show Inherited Public Properties" src="images/collapsed.gif" class="showHideLinkImage"> Show Inherited Public Properties</a>
</div>
</div>
<table id="summaryTableProperty" class="summaryTable hideInheritedProperty" cellpadding="3" cellspacing="0">
<table id="summaryTableProperty" class="summaryTable " cellpadding="3" cellspacing="0">
<tr>
<th>&nbsp;</th><th colspan="2">Property</th><th class="summaryTableOwnerCol">Defined&nbsp;by</th>
</tr>
Expand All @@ -99,6 +101,13 @@
A reference to the class object or constructor function for a given object instance.</div>
</td><td class="summaryTableOwnerCol"><a href="Object.html">Object</a></td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#declaration">declaration</a> : <a href="String.html">String</a>
<div class="summaryTableDescription">[read-only]

Returns a string representing the function declaration from the source code.</div>
</td><td class="summaryTableOwnerCol">Function</td>
</tr>
<tr class="hideInheritedProperty">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol"><img class="inheritedSummaryImage" title="Inherited" alt="Inherited" src="images/inheritedSummary.gif"></td><td class="summaryTableSignatureCol"><a class="signatureLink" href="Object.html#prototype">prototype</a> : <a href="Object.html">Object</a>
<div class="summaryTableDescription">[static]
Expand Down Expand Up @@ -222,6 +231,28 @@
showHideInherited();
--></script>
<div class="MainContent">
<a name="propertyDetail"></a>
<div class="detailSectionHeader">Property detail</div>
<a name="declaration"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">declaration</td><td class="detailHeaderType">property</td>
</tr>
</table>
<div class="detailBody">
<code>declaration:<a href="String.html">String</a></code>&nbsp;&nbsp;[read-only]<p>

Returns a string representing the function declaration from the source code.

</p><p>This can be used to find out naming and parameter details, and also determine what kind of function

the object is (anonymous function vs member fnction, etc).</p>
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: Small typo here function

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good spot, thanks!


<span class="label">Implementation</span>
<br>
<code>&nbsp;&nbsp;&nbsp;&nbsp;<a href="statements.html#AS3">AS3</a> function get declaration():<a href="String.html">String</a></code>
<br>
</div>
<a name="methodDetail"></a>
<div class="detailSectionHeader">Method detail</div>
<a name="apply()"></a>
Expand All @@ -243,7 +274,9 @@
</table>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td valign="top" style="white-space:nowrap"><b>Runtime version:&nbsp;</b></td><td></td>
<td valign="top" style="white-space:nowrap"><b>Runtime version:&nbsp;</b></td><td>AIR&nbsp;1.0

</td>
</tr>
</table>
<p></p><p>
Expand Down Expand Up @@ -320,7 +353,9 @@
</table>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td valign="top" style="white-space:nowrap"><b>Runtime version:&nbsp;</b></td><td></td>
<td valign="top" style="white-space:nowrap"><b>Runtime version:&nbsp;</b></td><td>AIR&nbsp;1.0

</td>
</tr>
</table>
<p></p><p>
Expand Down Expand Up @@ -539,11 +574,11 @@
<p></p>
<div class="feedbackLink">
<center>
<a href="mailto:[email protected]?subject=ASLR Feedback(Wed Sep 28 2022, 6:12 PM GMT+01:00) : Function">Submit Feedback</a>
<a href="mailto:[email protected]?subject=ASLR Feedback(Mon Feb 19 2024, 3:46 PM GMT) : Function">Submit Feedback</a>
</center>
</div>
<center class="copyright"> &copy; 2004-2022 Adobe Systems Incorporated. All rights reserved. <br>Wed Sep 28 2022, 6:12 PM GMT+01:00<br> <a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/3.0/"><img alt="Creative Commons License" style="border-width:0" src="https://i.creativecommons.org/l/by-nc-sa/3.0/80x15.png" /></a> </center>
<center class="copyright"> &copy; 2004-2022 Adobe Systems Incorporated. All rights reserved. <br>Mon Feb 19 2024, 3:46 PM GMT<br> <a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/3.0/"><img alt="Creative Commons License" style="border-width:0" src="https://i.creativecommons.org/l/by-nc-sa/3.0/80x15.png" /></a> </center>
</div>
</body>
</html>
<!-- &copy; 2004-2022 Adobe Systems Incorporated. All rights reserved. Wed Sep 28 2022, 6:12 PM GMT+01:00 <a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/3.0/"><img alt="Creative Commons License" style="border-width:0" src="https://i.creativecommons.org/l/by-nc-sa/3.0/80x15.png" /></a> -->
<!-- &copy; 2004-2022 Adobe Systems Incorporated. All rights reserved. Mon Feb 19 2024, 3:46 PM GMT <a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/3.0/"><img alt="Creative Commons License" style="border-width:0" src="https://i.creativecommons.org/l/by-nc-sa/3.0/80x15.png" /></a> -->
8 changes: 4 additions & 4 deletions static/reference/actionscript/3.0/Object.html

Large diffs are not rendered by default.

Loading
Loading