Skip to main content

  | मौसम…

411 समाचार
Public archive edition · Attributed source reporting with original dates · AI drafts are excluded

411 REFERENCE · Wikibooks

Rebol Programming/request-dir

Reference material by Wikibooks contributors. This retains its source identity and is not 411 news reporting.

USAGE: REQUEST-DIR /title title-line /dir where /keep /offset xy DESCRIPTION: Requests a directory using a popup list. REQUEST-DIR is a function value. REFINEMENTS /title -- Change heading on request. title-line -- (Type: any) /dir -- Set starting directory where -- (Type: file) /keep -- Keep previous directory path /offset xy -- (Type: any) SOURCE CODE request-dir: func [ "Requests a directory using a popup list." /title "Change heading on request." title-line /dir "Set starting directory" where [file!] /keep "Keep previous directory path" /offset xy ][ if block? dirout [ dirout: layout dirout max-dirs: to-integer f-list/size/y - 4 / f-txt/size/y center-face dirout ] set-face f-title any [title-line "Select a directory:"] if not all [keep path] [ path: copy either where [clean-path where] [what-dir] ] if all [not empty? path slash = last path] [remove back tail path] last-path: path result: none show-dir either offset [inform/offset dirout xy] [inform dirout] result ]