Skip to content
Permalink
Browse files

haxe 4 updates

  • Loading branch information...
felipevex committed Oct 14, 2019
1 parent b433d1f commit d40ed954228b2ebe124fe7f979aa7c52b6f13fa2
@@ -2,12 +2,20 @@ package priori.net;

import js.jquery.JQuery;

#if (haxe_ver >= 4.0)
class PriRequestURLEncodedValues {
#else
class PriRequestURLEncodedValues implements Dynamic {
#end

public function new() {

}

public function setField(field:String, value:Dynamic):Void {
Reflect.setField(this, field, value);
}

public function toString():String {
var object:Dynamic = haxe.Json.parse(haxe.Json.stringify(this));
return JQuery.param(object);
@@ -92,7 +92,10 @@ class PriURLLoader extends PriEventDispatcher {

if (Std.is(request.data, PriRequestURLEncodedValues)) {
contentType = PriRequestContentType.FORM_URLENCODED;
value = cast(request.data, PriRequestURLEncodedValues).toString();

var valueEncode:PriRequestURLEncodedValues = request.data;
value = valueEncode.toString();

} else if (request.contentType == PriRequestContentType.APPLICATION_JSON && !Std.is(request.data, String)) {
value = haxe.Json.stringify(request.data);
}
@@ -2,7 +2,11 @@ package priori.view.form;

import haxe.io.BytesData;
import haxe.io.Bytes;
#if (haxe_ver >= 4.0)
import js.html.ArrayBuffer;
#else
import js.html.compat.ArrayBuffer;
#end
import haxe.crypto.Base64;
import js.html.FileReader;
import priori.system.PriDevice;
@@ -5,7 +5,7 @@ import priori.geom.PriColor;
import priori.app.PriApp;
import priori.event.PriEvent;
import js.jquery.Event;
import js.JQuery;
import js.jquery.JQuery;

class PriFormTextArea extends PriFormElementBase {

BIN +616 Bytes (100%) run.n
Binary file not shown.

0 comments on commit d40ed95

Please sign in to comment.
You can’t perform that action at this time.