Lisp HUG Maillist Archive

Prompt-for-file

When using prompt-for-file (on Mac) in mode :save

How to get a default text in the text-input-pane ?
How to bypass the LW warning dialog when the file already exists (or replace
it by my own dialog) ?

I tried this :

 (prompt-for-file "Save Session As :"
     :pathname (translate-logical-pathname "foo:")
     :operation :save
     :pane-args '(:text "New Session")
     :if-exists :ok)

but it doesn¹t work : "New Session" is not display in the text-input-pane,
and, when confirming with a existing path, the LP warning still appear...

Thanks

Denis

----------------------------------------------------
Denis Pousseur
6 clos du Drossart
1180 Bruxelles, Belgique

Mail :  denis.pousseur@compositeurs.be
Website : http://compositeurs.be
----------------------------------------------------




Re: Prompt-for-file

On Dec 11, 2005, at 4:56 AM, Denis Pousseur wrote:

> When using prompt-for-file (on Mac) in mode :save
>
> How to get a default text in the text-input-pane ?

Provide a pathname with a file name for the :pathname keyword,  
e.g. :pathname "myfile.txt"

> How to bypass the LW warning dialog when the file already exists  
> (or replace
> it by my own dialog) ?

I'm not sure there is a way to replace the dialog unless you write  
some Objective-C code.

>  when confirming with a existing path, the LP warning still appear...


Looks like a bug to me with :if-exists :ok.

John



John DeSoi, Ph.D.
http://pgedit.com/
Power Tools for PostgreSQL


Updated at: 2020-12-10 08:49 UTC