[plt-scheme] finder:common-get-file-list

From: Stephen De Gabrielle (stephen at degabrielle.name)
Date: Fri May 2 10:56:58 EDT 2008

Thanks - you led me to get-directory, which is what I really wanted,
but it is interacting oddly for me;
It it requires me to click twice, first to open the directory, then
second to select it. It also seems very sensitive about the position
of the cursor.

This could be just me, as I am using a build from source (as of this
morning), and this latest build has caused all my buttons (run,
check-syntax etc.) to go mostly black. I think my wm is icewm.



#lang scheme/gui
(require framework)

; Make a frame by instantiating the frame% class
(define frame (new frame% [label "Example"]
                   [min-height 200][min-width 200]))

; Make a static text message in the frame
(define msg (new message% [parent frame]
                 [label "No events so far...                           ."]))

; Make a button in the frame
(new button% [parent frame]
     [label "Click Me"]
     ; Callback procedure for a button click:
     (callback
      (lambda (button event)
        (send msg set-label
              (path->string
               (get-directory
                #f #f #f null))))))

; Show the frame by calling its show method
(send frame show #t)



On Fri, May 2, 2008 at 2:05 PM, Robby Findler <robby at cs.uchicago.edu> wrote:
> Hm. Apparently, that function has been partly removed. It should
>  probably be completely removed.
>
>  You want:
>
>   get-file-list
>
>  I think.
>
>  hth,
>  Robby
>
>
>
>  On Fri, May 2, 2008 at 7:59 AM, Stephen De Gabrielle
>  <stephen at degabrielle.name> wrote:
>  > Hi, I'm trying to use the Framework (to select a folder), but I'm
>  >  having trouble getting the args right; I think I'm doing the minimum
>  >  sufficient to get a 'select files' dialog, but I'm getting a contrat
>  >  error that I don't quite understand - it doesn't seems to match the
>  >  contract in the manual.
>  >
>  >  Can anyone make any suggestions as to what I'm doing wrong?
>  >  [I'm using 3.99.0.23 [3m], built from source and running on Eee Xandros(debian)]
>  >
>  >  > (finder:common-get-file-list
>  >   #f
>  >   "get-folder"
>  >   #f
>  >   "not right"
>  >   #f)
>  >
>  >  . framework broke the contract
>  >   (->*
>  >    ()
>  >    ((or/c false/c path?)
>  >     string?
>  >     (or/c false/c byte-regexp?)
>  >     string?
>  >     (or/c
>  >      false/c
>  >      (is-a?/c interface:top-level-window<%>)))
>  >    (or/c (listof path?) false/c))
>  >  on finder:common-get-file-list; expected <(or/c (listof path?)
>  >  false/c)>, given: #<void>
>  >  >
>  >  >
>  >  _________________________________________________
>  >   For list-related administrative tasks:
>  >   http://list.cs.brown.edu/mailman/listinfo/plt-scheme
>  >
>



-- 
Cheers,

Stephen

--
Stephen De Gabrielle
s.degabrielle at ucl.ac.uk
Telephone +44 (0)20 7679 5242 (x45242)
Mobile 079 851 890 45
Project: Making Sense of Information (MaSI)
http://www.uclic.ucl.ac.uk/annb/MaSI.html

UCLIC: University College London Interaction Centre
http://www.uclic.ucl.ac.uk/

Remax House - 31/32 Alfred Place
London - WC1E 7DP


Posted on the users mailing list.