rebol [ Title: "Demo directory-selector style" File: %demo-directory-selector.r Date: 4-Aug-2006 Version: 1.0.1 Progress: 0.7 Status: "working" Needs: [View] Author: "Anton Rolls" Language: 'English Purpose: {Show how to use the directory-selector style} Usage: {} History: [ 1.0.0 [30-Oct-2003 {First version} "Anton"] 1.0.1 [4-Aug-2006 {manually including scroll-table's dependencies, as scroll-table no longer does that} "Anton"] ] ToDo: { - SEEMS FIXED (must have been something screwed up in the development session) request-dir only does its action when main window here is closed! (something to do with post-init ?) } Notes: { directory-selector -> request-dir } ] rebol/options/quiet: on site: select load-thru http://www.rebol.net/reb/index.r [folder "Anton"] clear find site %index.r do load-thru site/library/include.r include [ site/gui/directory-selector.r [directory-selector-style] site/util/request-dir.r [request-dir] ; needed by directory-selector site/gui/scroll-table.r [scroll-table-style] ; needed by request-dir site/gui/header-group.r [header-group-style] ; needed by scroll-table site/gui/list-sort-button.r [list-sort-button-style] ; needed by header-group ] view/offset center-face layout [ styles directory-selector-style directory-selector [ print ["user's validating action" mold face/field/text] ; Here you should verify that face/field/text is a valid path to a directory. ; If not, then you should change face/field/text to a correct value (the previous ; correct value, a default value, or, if you can be bothered, try to extract the ; longest correct path from the string). ; When you extracted a valid path, set the information back by ;set-face face my-path ; where my-path is of type file! ] ] 300x100