]> gitweb.factorcode.org Git - factor.git/commitdiff
file-picker.operations: fix invalid parameter order in save-as
authorAlexander Iljin <ajsoft@yandex.ru>
Mon, 29 May 2017 16:28:38 +0000 (19:28 +0300)
committerJohn Benediktsson <mrjbq7@gmail.com>
Mon, 29 May 2017 16:57:06 +0000 (09:57 -0700)
extra/file-picker/operations/operations.factor

index 1ca74a7b1cda3a20517b24c34733d6bfd27f6b10..b9dd831e124f4cfe4504f62b95e9bd05a7fa5c06 100644 (file)
@@ -1,11 +1,11 @@
 ! Copyright (C) 2017 Alexander Ilin.
 ! See http://factorcode.org/license.txt for BSD license.
 USING: byte-arrays file-picker io io.encodings.binary io.files
-kernel locals ui.commands ui.operations ;
+kernel ui.commands ui.operations ;
 IN: file-picker.operations
 
-:: save-as ( data -- )
-    "" save-file-dialog [ data binary set-file-contents ] when* ;
+: save-as ( seq -- )
+    "" save-file-dialog [ binary set-file-contents ] [ drop ] if* ;
 
 ! Right-click a byte-array presentation to open the Save As window.
 [ byte-array? ] \ save-as H{