]> gitweb.factorcode.org Git - factor.git/commitdiff
windows.dragdrop-listener-docs: fix documentation and add $code samples
authorAlexander Ilin <alex.ilin@protonmail.com>
Mon, 24 Jul 2023 22:16:56 +0000 (00:16 +0200)
committerAlexander Ilin <alex.ilin@protonmail.com>
Mon, 24 Jul 2023 22:19:11 +0000 (00:19 +0200)
basis/windows/dragdrop-listener/dragdrop-listener-docs.factor

index 7e7f4a41555885c4cedda18d89f3487179893f86..3a7dd63079bbda208f35b212b57a23ab3f07d766 100644 (file)
@@ -1,4 +1,4 @@
-! Copyright (C) 2017 Alexander Ilin.
+! Copyright (C) 2017, 2023 Alexander Ilin.
 ! See https://factorcode.org/license.txt for BSD license.
 USING: help.markup help.syntax kernel windows.ole32 ;
 IN: windows.dragdrop-listener
@@ -6,11 +6,10 @@ IN: windows.dragdrop-listener
 ABOUT: "windows.dragdrop-listener"
 
 ARTICLE: "windows.dragdrop-listener" "Dropping files onto listener window"
-"The " { $vocab-link "windows.dragdrop-listener" } " vocab is a demo of the COM wrapping facilities. It allows you to drag-and-drop any file from the Explorer onto a listener window, and have the contents of that file parsed and executed immediately. If the file does not contain valid Factor source code, you will see compilation errors." $nl
-"Register the current listener window to accept file drops:" $nl
-{ $subsections dragdrop-listener-window }
-"Only one file at a time can be dropped." ;
+"The " { $vocab-link "windows.dragdrop-listener" } " vocab is a demo of the COM wrapping facilities. It allows you to drag-and-drop files from the Explorer onto a listener window, and have the array of file names added to the current data stack." $nl
+"Register the current listener window to accept file drops:"
+{ $subsections dragdrop-listener-window } ;
 
 HELP: dragdrop-listener-window
-{ $description "Run this word from a listener to activate drag-and-drop support for the listener window." $nl
-"Note: if you get the \"" { $snippet "COM error 0x8007000e" } "\", you need to call " { $link ole-initialize } " first." } ;
+{ $description "Run this word from a listener to activate drag-and-drop support for the listener window:" { $code "dragdrop-listener-window" }
+"Note: if you get the \"" { $snippet "COM error 0x8007000e" } "\", you need to call " { $link ole-initialize } " first." } { $code "USE: windows.ole32 ole-initialize" } ;