Haxe 3.2.0-rc.1 and HTMLElement error

129 views
Skip to first unread message

Chris Anderson

unread,
Mar 16, 2015, 3:06:09 PM3/16/15
to haxe...@googlegroups.com
sorry to bug guys.  hit an issue after upgrading to haxe to 3.2 (also tested uninstall + install):

src/polymer/PolymerBase.hx:8: lines 8-19 : Module js.html.HtmlElement is loaded with a different case than js.html.HTMLElement

extern class PolymerBase extends HTMLElement implements ArrayAccess<Node>
{
}


if i test removing extend HTMLElement the std js lib starts to complain:

C:\HaxeToolkit\haxe\std/js/html/SelectElement.hx:28: lines 28-53 : Module js.html.HtmlElement is loaded with a different case than js.html.HTMLElement

appreciate any help

Chris Anderson

unread,
Mar 16, 2015, 3:11:08 PM3/16/15
to haxe...@googlegroups.com
also unrelated, when installing 3.2 the installer mentions 3.1.3 in a few places

Juraj Kirchheim

unread,
Mar 16, 2015, 3:43:57 PM3/16/15
to haxe...@googlegroups.com
There have been rather extensive changes to the js.html package to match the specification more closely. This is a list of the changes: https://github.com/HaxeFoundation/html-externs#haxe-32-api-migration

The concrete problem in your case is that HTMLElement is now HTMLHtmlElement and Element is now HtmlElement, wheareas now Element designates a common supertype for HtmlElement and SvgElement.

An alternative I have proposed was to call said supertype BaseElement and leave the old names as they were, but haven't gotten any feedback on that. I guess it's too later for that to happen now, but you never know.

The easiest thing right now is to put the old externs (get them at https://github.com/HaxeFoundation/haxe/releases/tag/3.1.3) into an extra directory and -cp them.

Best,
Juraj

--
To post to this group haxe...@googlegroups.com
http://groups.google.com/group/haxelang?hl=en
---
You received this message because you are subscribed to the Google Groups "Haxe" group.
For more options, visit https://groups.google.com/d/optout.

Bruno Garcia

unread,
Mar 16, 2015, 9:29:21 PM3/16/15
to haxe...@googlegroups.com
There's some more discussion about this over at https://github.com/HaxeFoundation/haxe/issues/4024#issuecomment-81959146

Adrian Veith

unread,
Mar 17, 2015, 4:14:46 AM3/17/15
to haxe...@googlegroups.com
Hm,

when I include js.html.ScriptElement I get:

ScriptElement.hx:28: lines 28-40 : HtmlElement is now HTMLElement, please replace all occurences accordingly.

which is rather weird, because ScriptElement is already:

extern class ScriptElement extends HTMLElement

what is Haxe trying to tell me ?

For the moment, it is best to go with old externs.

cheers, Adrian.

Simon Krajewski

unread,
Mar 17, 2015, 4:18:52 AM3/17/15
to haxe...@googlegroups.com
Am 17.03.2015 um 09:14 schrieb Adrian Veith:
> Hm,
>
> when I include js.html.ScriptElement I get:
>
> ScriptElement.hx:28: lines 28-40 : HtmlElement is now HTMLElement,
> please replace all occurences accordingly.
>
> which is rather weird, because ScriptElement is already:
>
> extern class ScriptElement extends HTMLElement
>
> what is Haxe trying to tell me ?

It is telling you to replace all occurrences of HtmlElement with
HTMLElement. However, that's not entirely correct either (and will be
updated again soon). See
https://github.com/HaxeFoundation/haxe/issues/4024#issuecomment-82018408

Simon

Adrian Veith

unread,
Mar 17, 2015, 5:58:07 AM3/17/15
to haxe...@googlegroups.com
ahh - now I get it. Maybe the message should be 

please replace ALL occurrences in EVERY classpath and library included in your project accordingly. 

best, Adrian.

Simon Krajewski

unread,
Mar 17, 2015, 6:07:19 AM3/17/15
to haxe...@googlegroups.com
Am 17.03.2015 um 10:58 schrieb Adrian Veith:
ahh - now I get it. Maybe the message should be 

please replace ALL occurrences in EVERY classpath and library included in your project accordingly.

I've changed the error message again to mention https://github.com/HaxeFoundation/html-externs#htmlelement where we can document this more accurately. I've also taken off the position because it would report the one where it's _not_ broken in most cases.

Simon

JLM

unread,
Mar 22, 2015, 12:05:16 PM3/22/15
to haxe...@googlegroups.com
I presume when it had the position it would help me know which haxelib I needed to fix? 
I made a small change to openfl textfield
 line 1188  change to           div = Browser.document.createDivElement();
I found on the issues list but I don't know if the project is more fixed or less fixed, does this error refer to one problem or many? 
The haxe compiler is normally very helpful but with this issue it seems to be not helpful.

Simon Krajewski

unread,
Mar 22, 2015, 12:53:49 PM3/22/15
to haxe...@googlegroups.com
Are you getting that error with RC2? I forgot to remove it but I don't
think it should actually trigger in RC2.

Simon

Justin L Mills

unread,
Mar 22, 2015, 1:13:19 PM3/22/15
to haxe...@googlegroups.com
Simon

I am getting the error on RC2 but the version number only says 3.2.0
which is not ideal just reinstalled to be double sure, but my downloads
show I have already downloaded so yes this is with RC2. (
http://haxe.org/download/version/3.2.0-rc.2 ) mac build on yosemite.

I tried to reduce the code to bare minimium but still representative of
the openfl build structure so would need
an "src" folder with Main.hx in and an "Assets" folder which is empty.

Main.hx

package;
import flash.display.Sprite;
class Main extends Sprite {
public static function main(): Void {
Lib.current.addChild(new Main());
}
public function new() {
super();
}
}

application.xml

<?xml version="1.0" encoding="utf-8"?>
<project>
<meta title="TestOpenfl" package="lib.TestOpenfl.examples"
version="1.0.0" company="JLM" />
<app main="Main" path="bin" file="testOpenfl" />
<window background="#ffffff" fps="60" />
<window width="780" height="340" unless="mobile" />
<window width="0" height="0" if="html5" />
<haxedef name="source-map-content" if="html5" />
<window orientation="landscape" vsync="false" antialiasing="0"
if="cpp" />
<set name="SWF_VERSION" value="11.2" />
<source path="src" />
<haxelib name="openfl" />
<assets path="./assets" rename="assets" />
</project>

build.hxml

-cmd lime build application.xml html5 -debug -v

currently my haxelib looks like...
actuate: 1.8.1 [1.8.2]
box2d: [1.2.3]
format: [3.1.2]
haxelib_client: [3.1.0-rc.4]
haxeui: 1.7.0 [1.7.1]
hscript: [2.0.4]
hxcpp: 3.1.48 3.1.68 [3.2.37]
hxcs: [3.1.1]
hxDaedalus: [0.0.2]
hxjava: [3.1.0]
layout: 1.1.0 [1.2.0]
lime: 2.0.1 2.0.6 2.1.2 [2.1.3]
openfl-samples: 2.2.1 [2.2.2]
openfl: 2.2.4 2.2.7 2.2.8 [3.0.0-beta]
openflump: git [dev:/usr/lib/haxeLibrary/openflump/git]
polygonal-ai: [1.0.0]
polygonal-core: [1.0.4]
polygonal-ds: [1.4.1]
polygonal-gl: [1.0.4]
polygonal-motor: [0.2.0]
polygonal-native: [1.0.0]
polygonal-printf: [1.0.2-beta]
polygonal-ui: [1.0.2]
svg: [1.0.8]
swf: 1.7.6 [1.7.7]
unknown: [1.0.0]
yagp: [1.1.4]

Obviously this is an Openfl issue unless I am mistaken, but really hard
to locate it?

Simon Krajewski

unread,
Mar 22, 2015, 1:47:26 PM3/22/15
to haxe...@googlegroups.com
Bruno just removed the error message rewrite so you can just grab the
latest executable from builds.haxe.org and drop it in.

Simon
Reply all
Reply to author
Forward
0 new messages