intellij-haxe icon indicating copy to clipboard operation
intellij-haxe copied to clipboard

Can't Use Classes Inside Swf for Autocomplete

Open CanIGetaPR opened this issue 6 years ago • 1 comments

Affected versions: 1.1 for IDEA 2018.x ,1.2 for IDEA 2019.x OS: Windows IDE: IDEA Ultimate 2019.2

The IDE sees the classes inside a swf but they are unresolved in my code.

image

image

So auto complete doesn't work. The program runs fine and finds the classes.

CanIGetaPR avatar Aug 01 '19 14:08 CanIGetaPR

This does not make much sense to me. the way i see it these are classes from 2 different languages. Your code is Haxe code and SWF files contains Bytecode/actionscript, If you want to use Classes from a different language you will most likely have to declare them as externs somewhere, or try to mimic what openFl does with its Assets using @:bind and @:native. you cant just import them directly like your example above.

@:bind to overwrite the actionscript declaration when targeting flash/Air @:native("ClassName") does some kind of rewrite of the path to the class. More info here : https://haxe.org/manual/cr-metadata.html

m0rkeulv avatar Oct 28 '20 23:10 m0rkeulv

Natively supporting OpenFL's swf library is not currently planned.

CanIGetaPR avatar Apr 22 '24 12:04 CanIGetaPR