As I recall, there isn’t a consistent way to detect that the file dialog displayed by FileReference
has been cancelled on the html5 target. The current implementation in FileReference
can detect certain situations where 0 files are selected, but not necessarily when the Cancel button is clicked. It’s unfortunate, but I don’t think it can be made any better than it currently is.
Damn… you’re right, I thought it was working with FileReference because it has some code where it dispatches Event.CANCEL but It doesn’t seem to dispatch it when cancelling the file dialog.
… I guess I have some changes to do ^^
should I close/remove the issue I just opened ?
I copied the basic Event.CANCEL implementation from FileReference to FileReferenceList and closed the issue.
sounds good, thanks Josh
Thank you for your hard work!
Excellent! Very happy to hear about the new releases.
By the way, is Starling working with Hashlink target?
Following the guides:
openfl create starling:demo
I was able to run the demo in windows, flash and html targets in VSCode, but it does not work with Hashlink target (which is the one I need).
The following error appears:
"Can't cast String to i32"
In Reflect.hx, this error happens in line 83:
return hl.Api.callMethod(func, a);
func: fun(ManifestResources.hx:128)
Stack shows error comes from Execute.hx, method execute() : case -1: Reflect.callMethod(func, func, args); on line line 53.
I got: starling: [2.7.0] openfl: [9.3.1] lime: [8.1.0] hxcpp: [4.3.2]
It will be great if Starling runs on Hashlink target. Is that possible? Any ideas for me to try here?
Thanks!
Bruno
Hi bruno,
I didn’t follow HashLink target status with OpenFL : is it officially supported now ? If it is, I’ll do my best to fix any Starling issue on this target.
Yes. Please try to ensure that Starling works on HashLink.
Will do, I should be able to look into it sometime this week
Thank you! I’ll try to get an update out right away once you get it working.
Great! Thanks, Matse and Josh!
Starling 2.7.1, which works on HashLink target, is available on OpenFL’s github GitHub - openfl/starling: The "Cross-Platform Game Engine", a popular Stage3D framework
Haxelib version should follow soon
It is very nice to hear about it. Great news! Thanks!