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

Conversation

ajwfrost
Copy link
Contributor

Hi
Updated ActionScript APIs for AIR 51.0 are in this branch. Likely to issue the preview release tomorrow so is it possible to get this merged in and published please? We're referencing the "what's new" page in the release notes..
thanks
Andrew

@marchbold marchbold merged commit a667fa2 into airsdk:main Feb 20, 2024
2 checks passed

</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!

Copy link

@itlancer itlancer left a comment

Choose a reason for hiding this comment

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

May be wrong AIR 52 (not 51) mention

</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;52

Choose a reason for hiding this comment

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

@ajwfrost, AIR 52? May be AIR 51.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes not sure why we put 52!


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></p><p>
Checks whether the vector 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 (vector[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 vector[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

</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;52

Choose a reason for hiding this comment

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

AIR 52? May be 51?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Again.. oops, correcting that to 51!

@ajwfrost
Copy link
Contributor Author

I've just made the updates to the AS3 source code for the above feedback, will see whether we have any other errors in the documentation and then re-generate the HTML and push a further update in a few days...

thanks

@itlancer
Copy link

itlancer commented Feb 24, 2024

@ajwfrost
Few more comments:

  1. Couldn't find NetworkInfo::disableNetworkChanges documentation.
  2. Perhaps it should be documented at the same time:
    [Docs] No Geolocation::permissionStatus and Geolocation::requestPermission() description Adobe-Runtime-Support#2809
    [Desktop] Changing Stage::displayState after FullScreenEvent.FULL_SCREEN cause SecurityError #2152 Adobe-Runtime-Support#2492 (comment)
  3. https://airsdk.dev/reference/actionscript/3.0/flash/net/NetworkInfo.html#findInterfaces()
    NetworkInfo::findInterfaces() has corrupted link to NetworkInterface. Just try to click on NetworkInterface link.

@itlancer
Copy link

@ajwfrost
And may be need to add Font::registerFontFromByteArray() to "What's New" and PDF Release Notes. And may be here airsdk/Adobe-Runtime-Support#3081

@ajwfrost
Copy link
Contributor Author

Hi

We've got some further updates yes, just need to pick out the files that need to be updated and then create the next pull request.

That Font update is deliberately missing .. we added the AS3 API in preparation for the feature but I'm actually not sure yet whether it's feasible, it doesn't look like we have the source code from Adobe for font embedding within the compiler - it's pulled in from a separate library that I think was created by a different team and may no longer be available to us. So, not sure whether those "dynamic loading of font files" features will be viable, hence keeping them 'private' for now.

thanks

@ajwfrost
Copy link
Contributor Author

https://airsdk.dev/reference/actionscript/3.0/flash/net/NetworkInfo.html#findInterfaces()
NetworkInfo::findInterfaces() has corrupted link to NetworkInterface. Just try to click on NetworkInterface link.

Looks like a more generic issue with handling of 'Vector' types... e.g. Stage.stage3Ds has the same problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants