fzn7 / as3-commons Goto Github PK
View Code? Open in Web Editor NEWAutomatically exported from code.google.com/p/as3-commons
Automatically exported from code.google.com/p/as3-commons
The checksums (md5 and sha1) being published in the yoolab maven repository
are incorrect. This seems to be the case for many, if not all, artifacts.
For example, a maven build using as3commons-reflect-1.3 as a dependency
fails when checksum validation is turned on.
If I download the as3commons-reflect-1.3.pom from the yooolab maven
repository and the same pom from the subversion version control repository,
they are identical when I do a diff on them. I also get the same MD5 and
SAH1 checksums for them. But those checksums do not match those published
in the as3commons-reflect-1.3.pom.sha1 and as3commons-reflect-1.3.pom.md5
files in the yoolab repo.
Maven 2.2.0 had a bug in it that it published (i.e. deployed) bad checksums
(see http://jira.codehaus.org/browse/MNG-4235) Is it possible as3-commons
is using v 2.2.0?
Original issue reported on code.google.com by [email protected]
on 23 Apr 2010 at 7:30
What steps will reproduce the problem?
1. Call ClassUtils.isInterface(Object);
What is the expected output? What do you see instead?
Expect false, but get true instead
Please provide any additional information below.
There needs to be an extra check if the specified class is Object, than
return false as an exception (The describeType() XML for the Object class
doesn't have an <extendsClass/> element).
I've replace the isInterface code with the same code I ised in my previous
patch for the Type.isInterface property. I also added an extra unit test
for ClassUtils.isInterface().
Patches are attached.
Original issue reported on code.google.com by ihatelivelyids
on 3 Sep 2009 at 7:45
Attachments:
What steps will reproduce the problem?
1. Create an interface and decorate it with arbitrary metadata
2. Create a class that implements this interface
3. Instantiate a Type instance for this class
4. Verify that metadata of the interface will not be returned by the Type
instance
What is the expected output? What do you see instead?
IMHO it would be logical that the metadata from the implemented interfaces
is combined with the metadata of the implementing class.
This is of course open to discussion, but in case you agree, I've attached
a patch that will take care of this. (Oh, and I added some ASDoc for the
properties as well...)
Original issue reported on code.google.com by ihatelivelyids
on 9 Jun 2009 at 8:58
Attachments:
The following fails:
var start:Date = new Date(2010, 10, 7);
var end:Date = new Date(2010, 10, 8);
Assert.assertEquals(1, DateUtils.getDaysDiff(start, end));
A patch to fix this would be to substitute the getDaysDiff function with:
var startMillis:Number = startDate.getTime();
var endMillis:Number = endDate.getTime();
var dstOffset:Number = (startDate.getTimezoneOffset() -
endDate.getTimezoneOffset()) * MILLIS_PER_MINUTE;
return Math.ceil((endMillis - startMillis + dstOffset)/ MILLIS_PER_DAY);
Original issue reported on code.google.com by [email protected]
on 16 Aug 2010 at 5:55
When using flash.utils.describeType to describe a large class can be improved
if the results are cached for later use. Borrowing from the Flex SDK, usage of
DescribeTypeCache and DescribeTypeCacheRecord (minus the Flex SDK
dependencies) can improved performance.
Original issue reported on code.google.com by [email protected]
on 19 Feb 2010 at 9:45
Attachments:
The current namespace feels a bit awkward. Perhaps the following alternative
might be better?
flash.common.*
fl.common.*
Original issue reported on code.google.com by [email protected]
on 19 Feb 2010 at 9:36
Maven build is wrong. Released versions cannot have snapshot dependencies.
RE:
<artifactId>as3commons-reflect</artifactId>
<packaging>swc</packaging>
<version>1.1</version>
<name>AS3Commons Reflect</name>
<url>http://code.google.com/p/as3-commons</url>
<description>
Library providing a reflection API for ActionScript 3.0
</description>
<inceptionYear>2007</inceptionYear>
<dependencies>
<dependency>
<groupId>org.as3commons</groupId>
<artifactId>as3commons-lang</artifactId>
<version>1.0.0-SNAPSHOT</version>
<type>swc</type>
</dependency>
<dependency>
<groupId>org.as3commons</groupId>
<artifactId>as3commons-logging</artifactId>
<version>1.1</version>
<type>swc</type>
</dependency>
</dependencies>
Also, why is there no relased as3commons-lang artifact?
Original issue reported on code.google.com by [email protected]
on 22 Feb 2010 at 9:23
What steps will reproduce the problem?
1. Use one of the Type.for...() methods to return a type.
2. No method is available to determine isInterface().
3. WORKAROUND: use ClassUtils.isInterface(type.clazz) to determine if is
interface.
What is the expected output? What do you see instead?
Expect method directly on type object for determining interface
What version of the product are you using? On what operating system?
latest source
Please provide any additional information below.
Tiny feature improvement.
Original issue reported on code.google.com by carrymass
on 10 Aug 2009 at 3:32
Commons lang looks very promising and want to use in one of the projects.
Any update on when it will moved to release version. The version number in
the source seems to be different that the download.
Original issue reported on code.google.com by [email protected]
on 19 Mar 2010 at 5:26
Any call to registerClassAlias() will insert an "alias" attribute into the
describeType() XML. It would be convenient to add a alias property to Type.
Original issue reported on code.google.com by [email protected]
on 15 Oct 2009 at 5:45
What steps will reproduce the problem?
1.can't not use in ComboBox
Original issue reported on code.google.com by [email protected]
on 23 Aug 2010 at 8:11
When setter and getter accessors exist on an object using the
MethodInvokers invoke method only invokes the get accessor when passing
parameters to the method. example
class Person
{
var m_email:String;
public function get email() "String
{...}
public function set email( email:String ) : void
{ m_email = email; }
}
code example:
var objPerson:Person = new Person();
var params:Array = new Array();
params.push( "[email protected]" );
var m:MethodInvoker = new MethodInvoker();
m.target = objPerson;
m.method = "email";
m.arguments = params;
var returnValue:* = m.invoke();
I would expect the setter methodto be called because
the params is passed and it matches the method signature of the set email
function but the get method is called. Is there a different syntax required
here to invoke the setter?
I am using the as3commons-reflect-1.0.0 swc for this example.
Original issue reported on code.google.com by [email protected]
on 5 Feb 2010 at 1:51
(Originally posted on the Spring ActionScript Jira.)
I use org.as3commons.lang.StringUtils to compare Strings in my code.
In some cases the equals method does not behave like expected, i.e. the given
FlexUnit testcase fails:
Assert.assertEquals("Expressions are not equal", false,
StringUtils.equals("in","notin"));
What I expect is this testcase does not fail.
Original issue reported on code.google.com by christophe.herreman
on 16 Dec 2009 at 8:59
Not an issue really.
Quite a good idea to provide this commons toolkit. Is it possible to
provide a zipped asdoc (and src) for users to download? That'd be
convenient for offline usage.
Original issue reported on code.google.com by [email protected]
on 30 Jul 2009 at 2:55
Just trying to work with as3commons logging. It's quite difficult if I
don't want to write my own code for...
...limited Logger variants
...LogLevel is not configurable
...output is hardcoded in Loggers
...output is nasty ("(new Date()).toString()", full class name !!)
I found that logging branch of martin heidegger. It is really handy and
highly configureable.
Seems that some experience of as2lib went into that work...
I vote for merging this approach to trunk!
Original issue reported on code.google.com by [email protected]
on 19 May 2010 at 5:23
org.as3commons.emit.SWFReader.as shows an error on line 40.
1119: Access of possibly undefined property COMPRESSED_SWF_IDENTIFIER through a
reference with static type Class.
org.as3commons.serialization.xml.core.ASToXML.as shows an error on line 51.
1136: Incorrect number of arguments. Expected 5.
Thanks!
Original issue reported on code.google.com by [email protected]
on 23 Jun 2010 at 5:05
What steps will reproduce the problem?
1. ClassUtils.isImplementationOf only checks whether a class officially
implements an interface (i.e. whether the class definition includes the phrase
"Class extends Whatever implements Interface").
2. There is no method for determining whether a class actually contains all of
the methods necessary to fulfill an interface's implementation.
What is the expected output? What do you see instead?
A method for determining if a class implements all of the methods necessary to
fulfill an interface.
What version of the product are you using? On what operating system?
Latest trunk, revision 317, Windows XP.
Please provide any additional information below.
Attached is a patch to ClassUtils that introduces a new method,
"isInformalImplementationOf", that functions as desired. The patch also adds
appropriate tests to ClassUtilsTest. This functionality is useful when
applying a standard interface wrapper around classes for which one lacks source
control.
Original issue reported on code.google.com by [email protected]
on 26 Jul 2010 at 12:28
Attachments:
What steps will reproduce the problem?
1. Load in an external swf containing a class you wish to use. Wait for
Event.Complete.
2. Call Type.forName() with the name of a class contained in the external swf.
3. Class will not be found
4. WORKAROUND: on the loader, load with the LoaderContext.applicationDomain
property set to ApplicationDomain.currentDomain (merging class definitions).
5. Type.forName() returns the correct result.
What is the expected output? What do you see instead?
Throws and error, class not found
What version of the product are you using? On what operating system?
Latest from source
Please provide any additional information below.
Provide optional parameter to Type.for... methods of
(applicationDomain:ApplicationDomain = null) to allow accessing external
libraries.
Original issue reported on code.google.com by carrymass
on 10 Aug 2009 at 3:19
What steps will reproduce the problem?
1.var t:Type = Type.forName("flash.events.EventDispatcher");
2.compile and run
3.see exception in debug trace
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
preinitialize="preinit()"
layout="absolute"
minWidth="1024"
minHeight="768">
<mx:Script>
<![CDATA[
import org.as3commons.reflect.Type;
private function preinit():void
{
var t:Type = Type.forName("flash.events.EventDispatcher");
}
]]>
</mx:Script>
</mx:Application>
What is the expected output? What do you see instead?
Message: Error #2007: Parameter type must be non-null.
Stack trace: TypeError: Error #2007: Parameter type must be non-null.
at flash.events::Event()
at
org.as3commons.lang::ClassUtils$/newInstance()[/home/christophe/IdeaProjects/as3
commons/as3-commons-lang/src/main/actionscript/org/as3commons/lang/ClassUtils.as
:309]
at
org.as3commons.reflect::Type$/getTypeDescription()[/home/christophe/IdeaProjects
/as3commons/as3-commons-reflect/src/main/actionscript/org/as3commons/reflect/Typ
e.as:221]
at
org.as3commons.reflect::Type$/forClass()[/home/christophe/IdeaProjects/as3common
s/as3-commons-reflect/src/main/actionscript/org/as3commons/reflect/Type.as:138]
at
org.as3commons.reflect::Type$/forName()[/home/christophe/IdeaProjects/as3commons
/as3-commons-reflect/src/main/actionscript/org/as3commons/reflect/Type.as:108]
at
TypeXmlParser$/parseParameters()[/home/christophe/IdeaProjects/as3commons/as3-co
mmons-reflect/src/main/actionscript/org/as3commons/reflect/Type.as:668]
at
TypeXmlParser$/parseMethodsByModifier()[/home/christophe/IdeaProjects/as3commons
/as3-commons-reflect/src/main/actionscript/org/as3commons/reflect/Type.as:656]
at
TypeXmlParser$/parseMethods()[/home/christophe/IdeaProjects/as3commons/as3-commo
ns-reflect/src/main/actionscript/org/as3commons/reflect/Type.as:631]
at
org.as3commons.reflect::Type$/forClass()[/home/christophe/IdeaProjects/as3common
s/as3-commons-reflect/src/main/actionscript/org/as3commons/reflect/Type.as:148]
at
org.as3commons.reflect::Type$/forName()[/home/christophe/IdeaProjects/as3commons
/as3-commons-reflect/src/main/actionscript/org/as3commons/reflect/Type.as:108]
at
TypeXmlParser$/parseParameters()[/home/christophe/IdeaProjects/as3commons/as3-co
mmons-reflect/src/main/actionscript/org/as3commons/reflect/Type.as:668]
at
TypeXmlParser$/parseConstructor()[/home/christophe/IdeaProjects/as3commons/as3-c
ommons-reflect/src/main/actionscript/org/as3commons/reflect/Type.as:622]
at
org.as3commons.reflect::Type$/forClass()[/home/christophe/IdeaProjects/as3common
s/as3-commons-reflect/src/main/actionscript/org/as3commons/reflect/Type.as:146]
at
org.as3commons.reflect::Type$/forName()[/home/christophe/IdeaProjects/as3commons
/as3-commons-reflect/src/main/actionscript/org/as3commons/reflect/Type.as:108]
at TestReflect/preinit()[C:\Documents and Settings\tpatton\Adobe Flash
Builder Beta\TestReflect\src\TestReflect.mxml:14]
at TestReflect/___TestReflect_Application1_preinitialize()[C:\Documents
and Settings\tpatton\Adobe Flash Builder
Beta\TestReflect\src\TestReflect.mxml:3]
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at
mx.core::UIComponent/dispatchEvent()[C:\autobuild\3.x\frameworks\projects\framew
ork\src\mx\core\UIComponent.as:9308]
at
mx.core::UIComponent/initialize()[C:\autobuild\3.x\frameworks\projects\framework
\src\mx\core\UIComponent.as:5367]
at
mx.core::Container/initialize()[C:\autobuild\3.x\frameworks\projects\framework\s
rc\mx\core\Container.as:2526]
at
mx.core::Application/initialize()[C:\autobuild\3.x\frameworks\projects\framework
\src\mx\core\Application.as:846]
at TestReflect/initialize()[C:\Documents and Settings\tpatton\Adobe Flash
Builder Beta\TestReflect\src\TestReflect.mxml:0]
at
mx.managers::SystemManager/http://www.adobe.com/2006/flex/mx/internal::childAdde
d()[C:\autobuild\3.x\frameworks\projects\framework\src\mx\managers\SystemManager
.as:2043]
at
mx.managers::SystemManager/initializeTopLevelWindow()[C:\autobuild\3.x\framework
s\projects\framework\src\mx\managers\SystemManager.as:3273]
at
mx.managers::SystemManager/http://www.adobe.com/2006/flex/mx/internal::docFrameH
andler()[C:\autobuild\3.x\frameworks\projects\framework\src\mx\managers\SystemMa
nager.as:3097]
at
mx.managers::SystemManager/docFrameListener()[C:\autobuild\3.x\frameworks\projec
ts\framework\src\mx\managers\SystemManager.as:2955]
What version of the product are you using? On what operating system?
as3commons-reflect.1.1.swc
Windows XP SP 2
Flash Builder 4 targeting Flex 3.4 and Flash Plasyer 10.
Please provide any additional information below.
tobiaspatton-at-gmail-dot-com
Original issue reported on code.google.com by [email protected]
on 25 Sep 2009 at 6:36
What steps will reproduce the problem?
1. Parse an XML node which is registered as an Array but does not have children
Expected.
The Array property on parent object is null.
Result.
XML is parsed as an int and tries to set "0" to Array property
Original issue reported on code.google.com by [email protected]
on 10 Dec 2009 at 12:05
What steps will reproduce the problem?
1. Create an AIR application
2. Add this code in a creattion_complete handler (or anywhere else):
var clazz:Class = ClassUtils.forName(this.className);
var type:Type = Type.forClass(clazz);
3. Close the application
4. Check Windows Task Manager and see that the process 'adl.exe' remains active
What is the expected output? What do you see instead?
adl.exe ought to have been stopped along with the cl,osing of the
application, but it didn't.
What version of the product are you using? On what operating system?
Latest SVN version.
Please provide any additional information below.
I've attached patches that contain the fix for this issue. It turns out
there was a circular reference between the Type and AbstractMember classes.
Original issue reported on code.google.com by ihatelivelyids
on 11 May 2009 at 7:44
Attachments:
This is a request for the project to begin deploying artifacts built against
the Flex 4 SDK.
When building a Flex 4 project using flex-mojos, it will report an SDK version
mismatch error and fail the build. An easy fix is to set flex-mojos'
ignoreVersionIssues flag to true, however this will likely lead to instability
issues, especially if other libraries are not flex 4 compatible.
Great work on the libraries!
Original issue reported on code.google.com by [email protected]
on 26 Jul 2010 at 10:01
What steps will reproduce the problem?
1. Create a bindable property of a custom type in Flex Builder (Flash Builder)
2. Call Type.forClass() method on that Type
3. See stack trace error.
What is the expected output? What do you see instead?
This happens because when a property is marked [Bindable], the Flex
preprocessor inserts an Event (PropertyChangeEvent). Event has non
defaulted arguments in the constructor, and for some reason those are not
making it into the parsed arguments.
---------
Message: Error #2007: Parameter type must be non-null.
Stack trace: TypeError: Error #2007: Parameter type must be non-null.
at flash.events::Event()
at
org.as3commons.lang::ClassUtils$/newInstance()[/Users/evan.gifford/Documents/Fle
x
Builder 3/AS3Commons_Lang/src/org/as3commons/lang/ClassUtils.as:309]
at
org.as3commons.reflect::Type$/getTypeDescription()[/Users/evan.gifford/Documents
/Flex
Builder 3/AS3Commons_Reflect/src/org/as3commons/reflect/Type.as:223]
at
org.as3commons.reflect::Type$/forClass()[/Users/evan.gifford/Documents/Flex
Builder 3/AS3Commons_Reflect/src/org/as3commons/reflect/Type.as:138]
at
org.as3commons.reflect::Type$/forName()[/Users/evan.gifford/Documents/Flex
Builder 3/AS3Commons_Reflect/src/org/as3commons/reflect/Type.as:108]
at TypeXmlParser$/parseParameters()[/Users/evan.gifford/Documents/Flex
Builder 3/AS3Commons_Reflect/src/org/as3commons/reflect/Type.as:672]
at
TypeXmlParser$/parseMethodsByModifier()[/Users/evan.gifford/Documents/Flex
Builder 3/AS3Commons_Reflect/src/org/as3commons/reflect/Type.as:660]
at TypeXmlParser$/parseMethods()[/Users/evan.gifford/Documents/Flex
Builder 3/AS3Commons_Reflect/src/org/as3commons/reflect/Type.as:635]
at
org.as3commons.reflect::Type$/forClass()[/Users/evan.gifford/Documents/Flex
Builder 3/AS3Commons_Reflect/src/org/as3commons/reflect/Type.as:148]
at
org.as3commons.reflect::Type$/forInstance()[/Users/evan.gifford/Documents/Flex
Builder 3/AS3Commons_Reflect/src/org/as3commons/reflect/Type.as:83]
at
org.as3commons.xstream.mapper::Mapper$/resolveTypeByReflection()[/Users/evan.gif
ford/Documents/Flex
Builder 3/AS3Commons-XStream /src/org/as3commons/xstream/mapper/Mapper.as:17]
at
org.as3commons.xstream.converters.reflection::ReflectionConverter/map()[/Users/e
van.gifford/Documents/Flex
Builder 3/AS3Commons-XStream
/src/org/as3commons/xstream/converters/reflection/ReflectionConverter.as:58]
at
org.as3commons.xstream.converters.reflection::ReflectionConverter/fromXML()[/Use
rs/evan.gifford/Documents/Flex
Builder 3/AS3Commons-XStream
/src/org/as3commons/xstream/converters/reflection/ReflectionConverter.as:43]
at
org.as3commons.xstream.core::XMLToAS$/objectFromXML()[/Users/evan.gifford/Docume
nts/Flex
Builder 3/AS3Commons-XStream /src/org/as3commons/xstream/core/XMLToAS.as:32]
at
org.as3commons.xstream.converters.basic::ArrayConverter/fromXML()[/Users/evan.gi
fford/Documents/Flex
Builder 3/AS3Commons-XStream
/src/org/as3commons/xstream/converters/basic/ArrayConverter.as:19]
at
org.as3commons.xstream.core::XMLToAS$/objectFromXML()[/Users/evan.gifford/Docume
nts/Flex
Builder 3/AS3Commons-XStream /src/org/as3commons/xstream/core/XMLToAS.as:32]
at
org.as3commons.xstream::XStream/fromXML()[/Users/evan.gifford/Documents/Flex
Builder
3/AS3Commons-XStream /src/org/as3commons/xstream/XStream.as:33]
at LAB_BigList/xmlLoaderComplete()[/Users/evan.gifford/Documents/Flex
Builder 3/LAB_BigList/src/LAB_BigList.mxml:33]
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at flash.net::URLLoader/onComplete()
Original issue reported on code.google.com by [email protected]
on 26 Oct 2009 at 6:23
The cache of Type instances is currently a static Object, which emans that
every Type instance ever created will stay in memory for the entire
lifespan of an application.
Changing the cache into a Dictionary object with weak keys can negate this
problem.
I've attached a patch for the Type class that does this, it also adds a new
static method called resetCache(), calling this recreates the cache
dicitonary, optionally you can specify the weakKeys parameter which will e
passed on to the Dictionary constructor.
The Dictionary is created with weak keys by default.
Original issue reported on code.google.com by ihatelivelyids
on 17 Sep 2009 at 2:08
Attachments:
Hi,
The bug simply crashes my complex springactionscript config.
In the class Type, method forName there is an error which "looses" the
application domain given as parameter in some cases.
try {
if (_cache[name]) {
result = _cache[name];
} else {
result = Type.forClass(org.as3commons.lang.ClassUtils.forNa me(name,
applicationDomain));
}
}
should be
try {
if (_cache[name]) {
result = _cache[name];
} else {
result = Type.forClass(org.as3commons.lang.ClassUtils.forNa me(name,
applicationDomain), applicationDomain);
}
}
note the last applicationdomain. If omitted the Type.forClass is looking things
up in the wrong applicationDomain.
After adding this extra application domain my bug was solved.
cheers,
Arnoud
Original issue reported on code.google.com by [email protected]
on 21 Mar 2010 at 12:56
A log entry might not always be a string. Let ILogger methods accept Object
instead of String and allow the concretes to determine what to do with the
log entry instance.
Original issue reported on code.google.com by [email protected]
on 6 Jul 2009 at 10:31
What steps will reproduce the problem?
1. call isWriteable() for some read only property (with "get" function only)
What is the expected output? What do you see instead?
expected "false", got true
What version of the product are you using? On what operating system?
Latest from SVN as for 19/07/2009
Please provide any additional information below.
I've fixed with this patch
public function isReadable():Boolean
{
return (_access == AccessorAccess.READ_ONLY || _access ==
AccessorAccess.READ_WRITE) ? true : false;
}
public function isWriteable():Boolean
{
return (_access == AccessorAccess.WRITE_ONLY || _access ==
AccessorAccess.READ_WRITE) ? true : false;
}
Original issue reported on code.google.com by [email protected]
on 19 Jul 2009 at 12:24
Right now there is no clear way of determining whether an arbitrary type is
a Class or an interface.
Therefore I propose a new property on the Type class called 'isInterface'
which will return true if the specified Type is an interface.
In the describeType() XML there's not really a clear way of determining
this, so far all I can figure out is to check for the existence of an
<extendsClass/> element under the <factory> element. Only in the case that
'Object' is passed in as the clazz argument will this not work, therefore
for this one class there needs to be an exception in the code.
I have attached a patch file for the Type.as file that implements
aforementioned property plus a patch file for the TypeTest.as file that
adds a few tests for the new property.
cheers,
Roland
Original issue reported on code.google.com by ihatelivelyids
on 1 Sep 2009 at 4:09
Attachments:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.