important-cpu-97721
05/27/2023, 9:26 PMaverage-zoo-947
05/27/2023, 9:47 PM/home/miles/.local/share/haxe/lib/hxWidgets/1,11,0/src/wx/widgets/Entry.hx:3: characters 1-8 : The wx-config executable wasn't found in your PATH, and is required for compilation
I know I have to add wx-config to my path but not exactly sure from where, the normal gtk and gtk-3 packages both provide wx-config nor am I positive of a location for the fileaverage-zoo-947
05/27/2023, 9:47 PMhttps://cdn.discordapp.com/attachments/162395145352904705/1112134986473164870/image.png▾
few-controller-47434
05/27/2023, 10:24 PMfew-controller-47434
05/27/2023, 10:24 PMclass A {
public function new() {}
}
abstract B(Dynamic) {
@:from
public static function fromA():A {
return new A();
}
}
class Test {
public static function main() {
// fails with "error: A should be B"
foo(new Array<A>());
}
}
function foo(arr:Array<B>) {
trace("success");
}
few-controller-47434
05/27/2023, 10:24 PMlittle-oxygen-79174
05/28/2023, 1:19 AMblue-lizard-2018
05/28/2023, 1:56 AMabundant-exabyte-79096
05/28/2023, 3:30 AMabundant-exabyte-79096
05/28/2023, 3:30 AMabundant-exabyte-79096
05/28/2023, 3:33 AMhaxe
// PlayerIOExterns.hx
@:native("PlayerIO.authenticate")
extern function authenticate(gameId:String, connectionId:String, authArgs:Dynamic, insightSegments:Dynamic, successCallback:Dynamic->Void,errorCallback:Dynamic->Void):Void;
abundant-exabyte-79096
05/28/2023, 3:34 AMTypeError: Error #1006: authenticate is not a function.
abundant-exabyte-79096
05/28/2023, 3:35 AM<script src="playerio\PlayerIOClient.development.js"></script>
abundant-exabyte-79096
05/28/2023, 3:35 AMjs
PlayerIO.authenticate(
'[Enter your game id here]', //Game id
'public', //Connection id
{ userId:'user-id' }, //Authentication arguments
{ campaign:'2017' }, //Optional PlayerInsight segments
function(client) {
//Success!
//You can now use the client object to make API calls.
},
function(error) {
if (error.code == PlayerIOErrorCode.UnknownGame) {
//Unknown game id used
} else {
//Another error
}
}
);
abundant-exabyte-79096
05/28/2023, 3:36 AMable-painting-79791
05/28/2023, 4:43 AMhttps://cdn.discordapp.com/attachments/162395145352904705/1112239593245380688/image.png▾
important-cpu-97721
05/28/2023, 5:07 AMThis @:native meta is only supported on classes and interfaces declaration`
important-cpu-97721
05/28/2023, 5:16 AMjs
extern class PlayerIO {
@:native('authenticate') function authenticate(gameId:String, connectionId:String, authArgs:Dynamic, insightSegments:Dynamic, successCallback:Dynamic->Void,errorCallback:Dynamic->Void):Void;
}
Try it like that, I'm not sure about the native
metadata being possible for js target to use like you didbulky-exabyte-6537
05/28/2023, 7:44 AMD:\Projects\hashlink\src\module.c(513) : FATAL ERROR : Invalid signature for function simplex@generate : Piii_B required but Pi_B found in hdll
which as i understand it means that it's reading (int)->bytes
func signature instead of (int, int, int)->bytes
anyone experienced this before?bulky-exabyte-6537
05/28/2023, 7:46 AMc
#define HL_NAME(n) simplex_##n
#include <hl.h>
HL_PRIM vbyte* HL_NAME(generate)(int width, int height, int seed)
{
vbyte* buffer = hl_alloc_bytes(width * height);
return buffer;
}
DEFINE_PRIM(_BYTES, generate, _I32, _I32, _I32);
bulky-exabyte-6537
05/28/2023, 7:47 AMhaxe
@:hlNative("simplex")
class Simplex {
public static function generate(width:Int, height:Int, seed:Int):hl.Bytes return null;
}
important-cpu-97721
05/28/2023, 7:56 AMpowerful-morning-89
05/28/2023, 8:00 AMDEFINE_PRIM(_BYTES, generate, _I32 _I32 _I32)
important-cpu-97721
05/28/2023, 8:00 AMimportant-cpu-97721
05/28/2023, 8:00 AMbulky-exabyte-6537
05/28/2023, 8:01 AMabundant-exabyte-79096
05/28/2023, 10:15 AMhaxe
@:native("PlayerIO")
extern class PlayerIO {
static public function authenticate(gameId:String, connectionId:String, authArgs:Dynamic, insightSegments:Dynamic, successCallback:Dynamic->Void,
errorCallback:Dynamic->Void):Void;
}
but now getting error : ReferenceError: Error #1065: Variable PlayerIO is not defined.
delightful-country-10713
05/28/2023, 1:30 PMpowerful-morning-89
05/28/2023, 3:02 PM@:hlNative("builtin","foo")
should do the trick.
Still needs the DEFINE_PRIM stuff though.average-zoo-947
05/28/2023, 3:18 PM/home/miles/.local/share/haxe/lib/hxWidgets/1,11,0/src/wx/widgets/Entry.hx:3: characters 1-8 : The wx-config executable wasn't found in your PATH, and is required for compilation
I know I have to add wx-config to my path but not exactly sure from where, the normal gtk and gtk-3 packages both provide wx-config nor am I positive of a location for the file.