Thread Rating:
  • 343 Vote(s) - 2.92 Average
  • 1
  • 2
  • 3
  • 4
  • 5
choose-file で初期提案ファイル名を指定したい
09-11-2013, 06:12 PM,
choose-file で初期提案ファイル名を指定したい
choose-file プロシージャで、初期提案値として、ファイル名を指定することはできないのでしょうか。

choose-file で表示されるダイアログは、下記の優先度で表示されるパスを決めている、という認識です。
①deafult-locaition で指定されたURL

deafult-locaition では、まだ存在しないファイルパスを指定しても、無視されてしまうので、困っています。



例:default-file-name で指定できる、など。

09-14-2013, 11:21 AM,
RE: choose-file で初期提案ファイル名を指定したい
You should be able to choose the default filename if you include it in a full URL that you provide as the default-location argument. It is not selected in the dialog box, but it is pre-entered in the filename text field. Note that this only works if you are privileged or if running non-privileged if the Url is a PrivilegedUrl.
09-17-2013, 08:18 PM,
RE: choose-file で初期提案ファイル名を指定したい
wbardwel さん



現時点で、私は、dearult-locationを [c:\]を基底フォルダとして、設定しています。([c:\hoge.txt]のように)
多くのWindows ユーザーは、PCの中に [c:\] が存在するので、


It is my purpose that it does not depend on the environment of the user's PC, to display the file name of the default at file dialog.

It means without the specified folder, just specify the file name.

At the moment, my workaround is setting a path with a base drive name, like [c:/hoge.txt]

Most of Windows user's PC has C drive.
So, this way will be success in many cases, to display the file name at file dialog.

However, in this way, there is problem which it willbe display C drive initially , each time you show the file dialog.

Usualy, may user would expect to display the same folder where you saved last time initially.
09-23-2013, 10:06 AM,
RE: choose-file で初期提案ファイル名を指定したい
If you are running a privileged applet I think that you can find out the directory that it will use and generate the proper Url using your desired filename. For an unprivileged applet, it was regarded as not safe to allow providing any information about a path that you have not already gotten permission to edit (which you show by having a PrivilegedUrl for the location.) (This is because users often just hit Enter, and the idea is to make sure an applet can't try to get permission to read or write a system file.)

09-24-2013, 10:14 AM, (This post was last modified: 09-24-2013, 10:24 AM by umemura.)
RE: choose-file で初期提案ファイル名を指定したい

I would like to display on file dialog as "test.txt" , even if dosen't exist "hoge" directroy.
But this sample dosen't work , even running on a privileged.

    {on Action do
        def du = {url "file:///c:/hoge/test.txt"}
        {if-non-null u = {choose-file
                             style =,
                             default-location = du
                         } then
            {popup-message u}

I use curl version is 8.0.2.

次にchoose-file プロシージャを読んだときに利用されるディレクトリのURLを取得できるのでしょうか。
そして、そのディレクトリに、自分の希望するファイル名をつなげてdefaurl-location として指定すれば、

You mean you can get directory url which curl's file dialog will use or generate when showing itself by called choose-file prosedure.
So, I can concat a file name to the directory url, and pass to chose-file prosedure as default-directory?

Do I misunderstand something?

10-25-2013, 03:27 PM, (This post was last modified: 01-24-2014, 01:04 PM by Sunny754569.)
RE: choose-file で初期提案ファイル名を指定したい

Possibly Related Threads...
Thread Author Replies Views Last Post
  choose-file の default-location が効かない umemura 2 3,391 04-08-2014, 07:48 PM
Last Post: umemura
Forum Jump:

Users browsing this thread:
1 Guest(s)

MyBB SQL Error

MyBB has experienced an internal SQL error and cannot continue.

SQL Error:
1017 - Can't find file: 'mybb_threadviews' (errno: 2)
INSERT INTO mybb_threadviews (tid) VALUES('967')