FileDialog: should use #if (!macro && lime_cffi) around calls to NativeCFFI methods, similar to Application
This commit is contained in:
@@ -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<HLBytes> = 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);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user