ncannasse 8 years ago
parent
commit
90597ae9ed
1 changed files with 3 additions and 3 deletions
  1. 3 3
      hxd/File.hx

+ 3 - 3
hxd/File.hx

@@ -43,8 +43,8 @@ class File {
 			try f = flash.filesystem.File.applicationDirectory.resolvePath(options.defaultPath) catch( e : Dynamic ) {}
 			try f = flash.filesystem.File.applicationDirectory.resolvePath(options.defaultPath) catch( e : Dynamic ) {}
 		lastBrowseDir = f;
 		lastBrowseDir = f;
 		var basePath = f.clone();
 		var basePath = f.clone();
-		function onSelect(_) {
-			f.removeEventListener(flash.events.Event.SELECT, onSelect);
+		function onSelectCallb(_) {
+			f.removeEventListener(flash.events.Event.SELECT, onSelectCallb);
 			var path = f.nativePath;
 			var path = f.nativePath;
 			if( options.relativePath ) {
 			if( options.relativePath ) {
 				if( !basePath.isDirectory ) basePath = basePath.parent;
 				if( !basePath.isDirectory ) basePath = basePath.parent;
@@ -67,7 +67,7 @@ class File {
 			};
 			};
 			onSelect(sel);
 			onSelect(sel);
 		}
 		}
-		f.addEventListener(flash.events.Event.SELECT, onSelect);
+		f.addEventListener(flash.events.Event.SELECT, onSelectCallb);
 		f.browseForOpen(options.title == null ? "" : options.title, filters);
 		f.browseForOpen(options.title == null ? "" : options.title, filters);
 	}
 	}
 	#end
 	#end