humboldtjs / humboldtjslibrary Goto Github PK
View Code? Open in Web Editor NEWThe core HumboldtJS library which provides display-model abstraction, file loaders, utilities, an event model and more
License: MIT License
The core HumboldtJS library which provides display-model abstraction, file loaders, utilities, an event model and more
License: MIT License
Example
theWindow.addEventListener("keypress", eventFunction(this, onWindowKeyPress1), false);
theWindow.addEventListener("keypress", eventFunction(this, onWindowKeyPress2), false);
Expected Result
All eventhandlers to be called.
Actual Result
onWindowKeyPress2
is never being called.
If we animatePropertyTo "-opacity" we get the following error. Easily workarounded, but it would be nice if it worked the same way as the easystyler expands vendor prefixes.
Uncaught TypeError: Cannot call method 'toString' of undefined
com.humboldtjs.utility.Animator.__chain.com.humboldtjs.utility.Animator.animatePropertyToAnimator.js:28
com.luxaflex.advisor.view.pages.typeselector.TypeSelectorComponent.__chain.com.luxaflex.advisor.view.pages.typeselector.TypeSelectorComponent.createElementsTypeSelectorComponent.js:64
com.luxaflex.advisor.view.pages.typeselector.TypeSelectorMediator.__chain.com.luxaflex.advisor.view.pages.typeselector.TypeSelectorMediator.handleNotificationTypeSelectorMediator.js:48
org.puremvc.as3.patterns.observer.Observer.__chain.org.puremvc.as3.patterns.observer.Observer.notifyObserverObserver.js:53
org.puremvc.as3.core.View.__chain.org.puremvc.as3.core.View.notifyObserversView.js:76
org.puremvc.as3.patterns.facade.Facade.__chain.org.puremvc.as3.patterns.facade.Facade.notifyObserversFacade.js:184
org.puremvc.as3.patterns.facade.Facade.__chain.org.puremvc.as3.patterns.facade.Facade.sendNotificationFacade.js:176
org.puremvc.as3.patterns.observer.Notifier.__chain.org.puremvc.as3.patterns.observer.Notifier.sendNotificationNotifier.js:28
com.luxaflex.advisor.commands.ExternalDataLoadedCommand.__chain.com.luxaflex.advisor.commands.ExternalDataLoadedCommand.onConfigLoadCompleteExternalDataLoadedCommand.js:62
nLuxaflex.js:150
com.humboldtjs.events.EventDispatcher.__chain.com.humboldtjs.events.EventDispatcher.dispatchEventEventDispatcher.js:95
com.humboldtjs.net.PrefixLoader.__chain.com.humboldtjs.net.PrefixLoader.doCallbackPrefixLoader.js:112
com.humboldtjs.net.PrefixLoader.__chain.com.humboldtjs.net.PrefixLoader.onCallbackPrefixLoader.js:119
(anonymous function)
Example
The following example is quircky, but valid in Actionscript.
var the
Logger.log("Hello world")
Actual result
var the;
var the com.humboldtjs.system.Logger.prototype.log("Hello world"); = null;
Expected result
The unterminated line ending properly terminated.
var the;
var the com.humboldtjs.system.Logger.prototype.log("Hello world");
Example
When assigning a float value into a uint
value, in Actionscript the value is always casted as a uint
, hereby loosing any fractions. In Humboldt no such casting is enforced.
var theTest:uint = 2 / 3;
Actual result
theTest
has a value of 0,6666666666666667
.
Expected result
theTest
has a value of 0
.
Example
var theTest:Vector.<uint>= new Vector.<uint>[ 1, 2, 3, 4, 5, 6, 8, 10, 12 ];
Result
The generated javascript denotes:
var theTest:Array = new Array()[ 1, 2, 3, 4, 5, 6, 8, 10, 12 ];
Expected Result
var theTest:Array = new Array( 1, 2, 3, 4, 5, 6, 8, 10, 12 );
Or:
var theTest:Array = [ 1, 2, 3, 4, 5, 6, 8, 10, 12 ];
If we link to the .swc file for the library the "compiler" complains with the following error:
[java] Cannot find file: com/humboldtjs/utility/Sine.as
[java] Dependency: com.humboldtjs.utility.Sine*
[java] Java Result: 1
This is probably because of the Sine reference, which makes it look in the same namespace, but actually it's namespaced in .easing. However when linking to the sources this doesn't happen (check out the project -> add the source instead of the library as an compiler argument).
This is a major inconvenience while developing, but easily workarounded.
Example
HTMLElement.setPercentWidth(12.65);
Expected result
The DOM element to have a width of 12.65%
.
Actual result
The DOM element has a width of 13%
.
In ActionScript (and other languages) it is not required to call the constructor, when you only need the default constructor. In Humboldt this is mandatory.
Forgetting/ignoring to create a constructor AND/OR without calling the "super()" will:
Not call member initialization.
FAIL
BECAUSE _myInitializedMember
is never initialized, because no constructor is declared.
package A
{
public class B
{
private var _myInitializedMember:String = "Hello world";
}
}
FAIL
Because _myInitializedMember
is never initialized because the super() is not being called.
package A
{
public class C
{
private var _myInitializedMember:String = "Hello world";
public function C()
{
}
}
}
OK
package A
{
public class C
{
private var _myInitializedMember:String = "Hello world";
public function C()
{
super();
}
}
}
Example
When a object has not been derived from anything, in Actionscript the object is implicitly being derived from Object
, hereby making a super()
call is completly valid.
class A
{
public function A()
{
// Calling the super now will trigger a Huboldt fault...
super();
}
}
class A extends B
{
public function A()
{
// OK
super();
}
}
Actual result
Class A will trigger an runtime error.
Expected result
Actionscript behaviour, so calling Class A should not trigger a runtime error.
At startup of an application that is using the Animators, everything is working nice.
But if you then switch browser tabs to another site and then go back to the application, the animations are not the same (faster?)
I think this has to do with a change in the Stage class.
Can be reproduced in Chrome/Firefox/Safari.
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.