From d299add52df39e9e879bbf09c3eacde851eb2dba Mon Sep 17 00:00:00 2001 From: Josh Tynjala Date: Wed, 3 May 2023 12:29:35 -0700 Subject: [PATCH] FileDialog: should use #if (!macro && lime_cffi) around calls to NativeCFFI methods, similar to Application --- src/lime/ui/FileDialog.hx | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/lime/ui/FileDialog.hx b/src/lime/ui/FileDialog.hx index d1ac15372..62c7c1c00 100644 --- a/src/lime/ui/FileDialog.hx +++ b/src/lime/ui/FileDialog.hx @@ -110,6 +110,7 @@ class FileDialog #end var path = null; + #if (!macro && lime_cffi) #if hl var bytes = NativeCFFI.lime_file_dialog_open_file(title, filter, defaultPath); if (bytes != null) @@ -119,6 +120,7 @@ class FileDialog #else path = NativeCFFI.lime_file_dialog_open_file(title, filter, defaultPath); #end + #end worker.sendComplete(path); @@ -128,6 +130,7 @@ class FileDialog #end var paths = null; + #if (!macro && lime_cffi) #if hl var bytes:NativeArray = cast NativeCFFI.lime_file_dialog_open_files(title, filter, defaultPath); if (bytes != null) @@ -141,6 +144,7 @@ class FileDialog #else paths = NativeCFFI.lime_file_dialog_open_files(title, filter, defaultPath); #end + #end worker.sendComplete(paths); @@ -150,6 +154,7 @@ class FileDialog #end var path = null; + #if (!macro && lime_cffi) #if hl var bytes = NativeCFFI.lime_file_dialog_open_directory(title, filter, defaultPath); if (bytes != null) @@ -159,6 +164,7 @@ class FileDialog #else path = NativeCFFI.lime_file_dialog_open_directory(title, filter, defaultPath); #end + #end worker.sendComplete(path); @@ -168,6 +174,7 @@ class FileDialog #end var path = null; + #if (!macro && lime_cffi) #if hl var bytes = NativeCFFI.lime_file_dialog_save_file(title, filter, defaultPath); if (bytes != null) @@ -177,6 +184,7 @@ class FileDialog #else path = NativeCFFI.lime_file_dialog_save_file(title, filter, defaultPath); #end + #end worker.sendComplete(path); } @@ -250,12 +258,14 @@ class FileDialog #end var path = null; + #if (!macro && lime_cffi) #if hl var bytes = NativeCFFI.lime_file_dialog_open_file(title, filter, defaultPath); if (bytes != null) path = @:privateAccess String.fromUTF8(cast bytes); #else path = NativeCFFI.lime_file_dialog_open_file(title, filter, defaultPath); #end + #end worker.sendComplete(path); }); @@ -318,12 +328,14 @@ class FileDialog #end var path = null; + #if (!macro && lime_cffi) #if hl var bytes = NativeCFFI.lime_file_dialog_save_file(title, filter, defaultPath); path = @:privateAccess String.fromUTF8(cast bytes); #else path = NativeCFFI.lime_file_dialog_save_file(title, filter, defaultPath); #end + #end worker.sendComplete(path); });