Skip to content

Commit

Permalink
fix(actionscript): correct event listener not being added correctly w…
Browse files Browse the repository at this point in the history
…hich prevented events from being dispatched (resolves #7)

feat(android): add level associated with a MemoryEvent.LOW_MEMORY_WARNING event (resolves #8)
  • Loading branch information
marchbold committed Sep 21, 2023
1 parent a8c181e commit 560c5b4
Show file tree
Hide file tree
Showing 133 changed files with 1,045 additions and 618 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@


###### 2023.09.22 [v4.2.1]

```
fix(actionscript): correct event listener not being added correctly which prevented events from being dispatched (resolves #7)
feat(android): add level associated with a MemoryEvent.LOW_MEMORY_WARNING event (resolves #8)
```


###### 2023.02.01 [v4.1.0]

```
Expand Down
21 changes: 19 additions & 2 deletions build.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<project default="all" name="ane.build">
<project default="all" name="ane.build" xmlns:if="ant:if">

<import file="build_common.xml" />
<property file="${common.basedir}/build_config/build.config" description="build properties" />
Expand All @@ -26,14 +26,19 @@
//
-->



<target name="version">
<antcall target="version_increment" if:true="${version.autoincrement}" />
<antcall target="version_write" />
</target>

<target name="version_increment" if="${version.autoincrement}">
<target name="version_increment">
<propertyfile file="./build_config/version.config">
<entry key="version_build" type="int" operation="+" value="1" />
</propertyfile>
<var name="version_build" value="" unset="true"/>
<var file="${common.basedir}/build_config/version.config" description="build version properties" />
</target>

<target name="version_write">
Expand Down Expand Up @@ -198,11 +203,23 @@ _site

<target name="airpackage">
<iterate target="deploy" directory="package" />
<if>
<available file="package/variants" type="dir"/>
<then>
<iterate target="deploy" directory="package/variants" />
</then>
</if>
</target>


<target name="clean_airpackage">
<iterate target="clean" directory="package" />
<if>
<available file="package/variants" type="dir"/>
<then>
<iterate target="clean" directory="package/variants" />
</then>
</if>
</target>


Expand Down
2 changes: 1 addition & 1 deletion build/VERSION.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

| Extension | Version | Android Lib | iOS Lib |
| --- | --- | --- | --- |
| com.distriqt.Memory | 4.1.0 | | |
| com.distriqt.Memory | 4.2.1 | | |
Binary file modified build/com.distriqt.Memory.ane
Binary file not shown.
Binary file modified build/swc/com.distriqt.Memory.swc
Binary file not shown.
35 changes: 26 additions & 9 deletions build_common.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,6 @@

<dirname property="common.basedir" file="${ant.file.common}" />

<property file="${common.basedir}/../../build_config/version.config" description="grp version properties" />
<property file="${common.basedir}/build_config/version.config" description="build version properties" />
<property file="${common.basedir}/build_config/build.config" description="build properties" />
<property file="${common.basedir}/build_config/global.config" description="global properties" />

<property name="version.grp" value="${version_grp_major}.${version_grp_minor}.${version_grp_build}" />

<taskdef resource="net/sf/antcontrib/antlib.xml"/>
<target name="bootstrap">
<mkdir dir="${user.home}/.ant/lib"/>
Expand All @@ -21,6 +14,19 @@
<get dest="${user.home}/.ant/lib/commons-logging-api.jar" src="http://search.maven.org/remotecontent?filepath=commons-logging/commons-logging-api/1.1/commons-logging-api-1.1.jar"/>
</target>

<var file="${common.basedir}/build_config/version.config" description="version properties" />
<trycatch>
<try>
<var file="${common.basedir}/../../build_config/version.config" description="grp version properties" />
</try>
<catch>
</catch>
</trycatch>
<property file="${common.basedir}/build_config/build.config" description="build properties" />
<property file="${common.basedir}/build_config/global.config" description="global properties" />

<property name="version.grp" value="${version_grp_major}.${version_grp_minor}.${version_grp_build}" />


<!-- PLATFORM INFORMATION -->

Expand Down Expand Up @@ -80,8 +86,8 @@
<attribute name="name" />
<attribute name="value" />
<![CDATA[
project.setProperty( attributes.get( "name" ),
attributes.get( "value" ).replaceAll( "\\.", "" ) );
project.setNewProperty( attributes.get( "name" ),
attributes.get( "value" ).replaceAll( "\\.", "" ) );
]]>
</scriptdef>

Expand Down Expand Up @@ -201,4 +207,15 @@
<var name="android.targetSdkVersion" unset="true" />
<property name="android.targetSdkVersion" value="${targetSdkVersion}" />


<titlecase name="project.grptitle" value="${project.grp}" />
<titlecase name="project.nametitle" value="${project.name}" />

<cleanchars name="ios.name" value="${project.grptitle}${project.nametitle}" />

<cleanchars name="windows.name" value="${project.grp}${project.name}" />

<cleanchars name="macos.name" value="${project.grptitle}${project.nametitle}" />


</project>
8 changes: 8 additions & 0 deletions build_config/_codetmpl/unity/UnityConst.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
namespace @NAMESPACE@
{
public class @CLASS@
{
public const string EXTENSIONID = "@EXTENSIONID@";
public const string VERSION = "@VERSION@";
}
}
5 changes: 3 additions & 2 deletions build_config/global.config
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ output.tmpdir = .tmp
codetmpl = ./build_config/_codetmpl
airpackage.dir = ./package
airpackage.tmpl = ${airpackage.dir}/_packagetmpl
version.autoincrement = true
version.autoincrement = false
version.android =
version.ios =
docs.external_site_source = /Users/marchbold/work/distriqt/extensions/airnativeextensions/nativeextensions-documentation/source
Expand Down Expand Up @@ -48,7 +48,7 @@ android.targetSdkVersion = 33
# SUPPORT
supportlibs.dir = /Users/marchbold/work/distriqt/extensions/supportlibs
supportlibs.corelibraries = ${supportlibs.dir}/corelibraries
supportlibs.corejar = ${supportlibs.corelibraries}/platform/android/bin
supportlibs.corejar = ${supportlibs.corelibraries}/build/android
supportlibs.coreframework = ${supportlibs.corelibraries}/platform/ios/build


Expand All @@ -69,3 +69,4 @@ unity.cmd = /Users/marchbold/work/sdks/unity/current/Unity.app/Contents/MacOS/Un
unity.iphoneos_dir = build_unity/${ios.xcode_build}-iphoneos
unity.iphonesimulator_dir = build_unity/${ios.xcode_build}-iphonesimulator
unity.tvos_dir = build_unity/${ios.xcode_build}-appletvos
unity.commondir = Assets/distriqt/Common
6 changes: 3 additions & 3 deletions build_config/version.config
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#Tue, 15 Feb 2022 12:43:51 +1000
#Thu, 21 Sep 2023 09:03:42 +1000

version_major=4
version_minor=1
version_build=0
version_minor=2
version_build=1

version.android=
version.ios=
5 changes: 4 additions & 1 deletion docs/asdocs/all-classes.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@ <h3><a href="class-summary.html" target="classFrame" style="color:black">All Cla
<tr>
<td><a href="com/distriqt/extension/memory/MemoryInfo.html" title="com.distriqt.extension.memory.MemoryInfo">MemoryInfo</a></td>
</tr>
<tr>
<td><a href="com/distriqt/extension/memory/MemoryWarningLevel.html" title="com.distriqt.extension.memory.MemoryWarningLevel">MemoryWarningLevel</a></td>
</tr>
</table>
</body>
</html>
<!--Copyright distriqt 2016<br/>Wed Feb 1 2023, 09:11 PM +10:00 -->
<!--Copyright distriqt 2016<br/>Fri Sep 22 2023, 09:15 AM +10:00 -->
2 changes: 1 addition & 1 deletion docs/asdocs/all-index-A.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@
if (!isEclipse() || window.name != ECLIPSE_FRAME_NAME) {titleBar_setSubTitle("A Index"); titleBar_setSubNav(false,false,false,false,false,false,false,false,false,false,false ,false,false,false,false,false);}
-->
</script><div class="MainContent"><br><table border="0" cellspacing="0" cellpadding="0"><tr><td colspan="2"><a name="A"></a><font color="black" size="10px" style="bold">A</font>&nbsp;&nbsp;<a href="all-index-B.html" onclick="javascript:loadClassListFrame('index-list.html');">B</a>&nbsp;&nbsp;<a href="all-index-C.html" onclick="javascript:loadClassListFrame('index-list.html');">C</a>&nbsp;&nbsp;<a href="all-index-D.html" onclick="javascript:loadClassListFrame('index-list.html');">D</a>&nbsp;&nbsp;<a href="all-index-E.html" onclick="javascript:loadClassListFrame('index-list.html');">E</a>&nbsp;&nbsp;<a href="all-index-F.html" onclick="javascript:loadClassListFrame('index-list.html');">F</a>&nbsp;&nbsp;<a href="all-index-G.html" onclick="javascript:loadClassListFrame('index-list.html');">G</a>&nbsp;&nbsp;<a href="all-index-H.html" onclick="javascript:loadClassListFrame('index-list.html');">H</a>&nbsp;&nbsp;<a href="all-index-I.html" onclick="javascript:loadClassListFrame('index-list.html');">I</a>&nbsp;&nbsp;<a href="all-index-J.html" onclick="javascript:loadClassListFrame('index-list.html');">J</a>&nbsp;&nbsp;<a href="all-index-K.html" onclick="javascript:loadClassListFrame('index-list.html');">K</a>&nbsp;&nbsp;<a href="all-index-L.html" onclick="javascript:loadClassListFrame('index-list.html');">L</a>&nbsp;&nbsp;<a href="all-index-M.html" onclick="javascript:loadClassListFrame('index-list.html');">M</a>&nbsp;&nbsp;<a href="all-index-N.html" onclick="javascript:loadClassListFrame('index-list.html');">N</a>&nbsp;&nbsp;<a href="all-index-O.html" onclick="javascript:loadClassListFrame('index-list.html');">O</a>&nbsp;&nbsp;<a href="all-index-P.html" onclick="javascript:loadClassListFrame('index-list.html');">P</a>&nbsp;&nbsp;<a href="all-index-Q.html" onclick="javascript:loadClassListFrame('index-list.html');">Q</a>&nbsp;&nbsp;<a href="all-index-R.html" onclick="javascript:loadClassListFrame('index-list.html');">R</a>&nbsp;&nbsp;<a href="all-index-S.html" onclick="javascript:loadClassListFrame('index-list.html');">S</a>&nbsp;&nbsp;<a href="all-index-T.html" onclick="javascript:loadClassListFrame('index-list.html');">T</a>&nbsp;&nbsp;<a href="all-index-U.html" onclick="javascript:loadClassListFrame('index-list.html');">U</a>&nbsp;&nbsp;<a href="all-index-V.html" onclick="javascript:loadClassListFrame('index-list.html');">V</a>&nbsp;&nbsp;<a href="all-index-W.html" onclick="javascript:loadClassListFrame('index-list.html');">W</a>&nbsp;&nbsp;<a href="all-index-X.html" onclick="javascript:loadClassListFrame('index-list.html');">X</a>&nbsp;&nbsp;<a href="all-index-Y.html" onclick="javascript:loadClassListFrame('index-list.html');">Y</a>&nbsp;&nbsp;<a href="all-index-Z.html" onclick="javascript:loadClassListFrame('index-list.html');">Z</a>&nbsp;&nbsp;</td></tr><tr><td class="idxrow" colspan="2"><a href="com/distriqt/extension/memory/Memory.html#addEventListener()" onclick="javascript:loadClassListFrame('com/distriqt/extension/memory/class-list.html');">addEventListener</a>(type:String, listener:Function, useCapture:Boolean, priority:int, useWeakReference:Boolean) &mdash; method, class com.distriqt.extension.memory.<a href="com/distriqt/extension/memory/Memory.html" onclick="javascript:loadClassListFrame('com/distriqt/extension/memory/class-list.html');">Memory</a></td></tr><tr><td width="20"></td><td></td></tr><tr><td class="idxrow" colspan="2"><a href="com/distriqt/extension/memory/MemoryInfo.html#availableMemory" onclick="javascript:loadClassListFrame('com/distriqt/extension/memory/class-list.html');">availableMemory</a> &mdash; Property, class com.distriqt.extension.memory.<a href="com/distriqt/extension/memory/MemoryInfo.html" onclick="javascript:loadClassListFrame('com/distriqt/extension/memory/class-list.html');">MemoryInfo</a></td></tr><tr><td width="20"></td><td>
The available memory on the system.</td></tr><tr><td colspan="2" style="padding-bottom:20px"></td></tr><tr><td colspan="2"><font color="black" size="10px" style="bold">A</font>&nbsp;&nbsp;<a href="all-index-B.html" onclick="javascript:loadClassListFrame('index-list.html');">B</a>&nbsp;&nbsp;<a href="all-index-C.html" onclick="javascript:loadClassListFrame('index-list.html');">C</a>&nbsp;&nbsp;<a href="all-index-D.html" onclick="javascript:loadClassListFrame('index-list.html');">D</a>&nbsp;&nbsp;<a href="all-index-E.html" onclick="javascript:loadClassListFrame('index-list.html');">E</a>&nbsp;&nbsp;<a href="all-index-F.html" onclick="javascript:loadClassListFrame('index-list.html');">F</a>&nbsp;&nbsp;<a href="all-index-G.html" onclick="javascript:loadClassListFrame('index-list.html');">G</a>&nbsp;&nbsp;<a href="all-index-H.html" onclick="javascript:loadClassListFrame('index-list.html');">H</a>&nbsp;&nbsp;<a href="all-index-I.html" onclick="javascript:loadClassListFrame('index-list.html');">I</a>&nbsp;&nbsp;<a href="all-index-J.html" onclick="javascript:loadClassListFrame('index-list.html');">J</a>&nbsp;&nbsp;<a href="all-index-K.html" onclick="javascript:loadClassListFrame('index-list.html');">K</a>&nbsp;&nbsp;<a href="all-index-L.html" onclick="javascript:loadClassListFrame('index-list.html');">L</a>&nbsp;&nbsp;<a href="all-index-M.html" onclick="javascript:loadClassListFrame('index-list.html');">M</a>&nbsp;&nbsp;<a href="all-index-N.html" onclick="javascript:loadClassListFrame('index-list.html');">N</a>&nbsp;&nbsp;<a href="all-index-O.html" onclick="javascript:loadClassListFrame('index-list.html');">O</a>&nbsp;&nbsp;<a href="all-index-P.html" onclick="javascript:loadClassListFrame('index-list.html');">P</a>&nbsp;&nbsp;<a href="all-index-Q.html" onclick="javascript:loadClassListFrame('index-list.html');">Q</a>&nbsp;&nbsp;<a href="all-index-R.html" onclick="javascript:loadClassListFrame('index-list.html');">R</a>&nbsp;&nbsp;<a href="all-index-S.html" onclick="javascript:loadClassListFrame('index-list.html');">S</a>&nbsp;&nbsp;<a href="all-index-T.html" onclick="javascript:loadClassListFrame('index-list.html');">T</a>&nbsp;&nbsp;<a href="all-index-U.html" onclick="javascript:loadClassListFrame('index-list.html');">U</a>&nbsp;&nbsp;<a href="all-index-V.html" onclick="javascript:loadClassListFrame('index-list.html');">V</a>&nbsp;&nbsp;<a href="all-index-W.html" onclick="javascript:loadClassListFrame('index-list.html');">W</a>&nbsp;&nbsp;<a href="all-index-X.html" onclick="javascript:loadClassListFrame('index-list.html');">X</a>&nbsp;&nbsp;<a href="all-index-Y.html" onclick="javascript:loadClassListFrame('index-list.html');">Y</a>&nbsp;&nbsp;<a href="all-index-Z.html" onclick="javascript:loadClassListFrame('index-list.html');">Z</a>&nbsp;&nbsp;</td></tr></table><p></p><center class="copyright"><footer>Copyright <a href="http://distriqt.com" target="_top">distriqt</a> 2016</footer><br/>Wed Feb 1 2023, 09:11 PM +10:00 </center></div></body></html><!--Copyright distriqt 2016<br/>Wed Feb 1 2023, 09:11 PM +10:00 -->
The available memory on the system.</td></tr><tr><td colspan="2" style="padding-bottom:20px"></td></tr><tr><td colspan="2"><font color="black" size="10px" style="bold">A</font>&nbsp;&nbsp;<a href="all-index-B.html" onclick="javascript:loadClassListFrame('index-list.html');">B</a>&nbsp;&nbsp;<a href="all-index-C.html" onclick="javascript:loadClassListFrame('index-list.html');">C</a>&nbsp;&nbsp;<a href="all-index-D.html" onclick="javascript:loadClassListFrame('index-list.html');">D</a>&nbsp;&nbsp;<a href="all-index-E.html" onclick="javascript:loadClassListFrame('index-list.html');">E</a>&nbsp;&nbsp;<a href="all-index-F.html" onclick="javascript:loadClassListFrame('index-list.html');">F</a>&nbsp;&nbsp;<a href="all-index-G.html" onclick="javascript:loadClassListFrame('index-list.html');">G</a>&nbsp;&nbsp;<a href="all-index-H.html" onclick="javascript:loadClassListFrame('index-list.html');">H</a>&nbsp;&nbsp;<a href="all-index-I.html" onclick="javascript:loadClassListFrame('index-list.html');">I</a>&nbsp;&nbsp;<a href="all-index-J.html" onclick="javascript:loadClassListFrame('index-list.html');">J</a>&nbsp;&nbsp;<a href="all-index-K.html" onclick="javascript:loadClassListFrame('index-list.html');">K</a>&nbsp;&nbsp;<a href="all-index-L.html" onclick="javascript:loadClassListFrame('index-list.html');">L</a>&nbsp;&nbsp;<a href="all-index-M.html" onclick="javascript:loadClassListFrame('index-list.html');">M</a>&nbsp;&nbsp;<a href="all-index-N.html" onclick="javascript:loadClassListFrame('index-list.html');">N</a>&nbsp;&nbsp;<a href="all-index-O.html" onclick="javascript:loadClassListFrame('index-list.html');">O</a>&nbsp;&nbsp;<a href="all-index-P.html" onclick="javascript:loadClassListFrame('index-list.html');">P</a>&nbsp;&nbsp;<a href="all-index-Q.html" onclick="javascript:loadClassListFrame('index-list.html');">Q</a>&nbsp;&nbsp;<a href="all-index-R.html" onclick="javascript:loadClassListFrame('index-list.html');">R</a>&nbsp;&nbsp;<a href="all-index-S.html" onclick="javascript:loadClassListFrame('index-list.html');">S</a>&nbsp;&nbsp;<a href="all-index-T.html" onclick="javascript:loadClassListFrame('index-list.html');">T</a>&nbsp;&nbsp;<a href="all-index-U.html" onclick="javascript:loadClassListFrame('index-list.html');">U</a>&nbsp;&nbsp;<a href="all-index-V.html" onclick="javascript:loadClassListFrame('index-list.html');">V</a>&nbsp;&nbsp;<a href="all-index-W.html" onclick="javascript:loadClassListFrame('index-list.html');">W</a>&nbsp;&nbsp;<a href="all-index-X.html" onclick="javascript:loadClassListFrame('index-list.html');">X</a>&nbsp;&nbsp;<a href="all-index-Y.html" onclick="javascript:loadClassListFrame('index-list.html');">Y</a>&nbsp;&nbsp;<a href="all-index-Z.html" onclick="javascript:loadClassListFrame('index-list.html');">Z</a>&nbsp;&nbsp;</td></tr></table><p></p><center class="copyright"><footer>Copyright <a href="https://distriqt.com" target="_top">distriqt</a> 2016</footer><br/>Fri Sep 22 2023, 09:15 AM +10:00 </center></div></body></html><!--Copyright distriqt 2016<br/>Fri Sep 22 2023, 09:15 AM +10:00 -->
Loading

0 comments on commit 560c5b4

Please sign in to comment.