Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

Computers are useless. They can only give you answers. -- Pablo Picasso


devel / comp.lang.tcl / Re: Where is the ttk::getOpenFile command?

SubjectAuthor
* Where is the ttk::getOpenFile command?Luc
`* Re: Where is the ttk::getOpenFile command?Rich
 `* Re: Where is the ttk::getOpenFile command?Luc
  `* Re: Where is the ttk::getOpenFile command?Schelte
   +* Re: Where is the ttk::getOpenFile command?Luc
   |`* Re: Where is the ttk::getOpenFile command?Rich
   | `* Re: Where is the ttk::getOpenFile command?Luc
   |  +- Re: Where is the ttk::getOpenFile command?Robert Heller
   |  `* Re: Where is the ttk::getOpenFile command?Schelte
   |   `* Re: Where is the ttk::getOpenFile command?saitology9
   |    +* Re: Where is the ttk::getOpenFile command?Alan Grunwald
   |    |`* Re: Where is the ttk::getOpenFile command?Luc
   |    | `* Re: Where is the ttk::getOpenFile command?Schelte
   |    |  `- Re: Where is the ttk::getOpenFile command?Luc
   |    `- Re: Where is the ttk::getOpenFile command?saitology9
   `* Re: Where is the ttk::getOpenFile command?saitology9
    +* Re: Where is the ttk::getOpenFile command?Schelte
    |`- Re: Where is the ttk::getOpenFile command?saitology9
    `- Re: Where is the ttk::getOpenFile command?Alan Grunwald

1
Where is the ttk::getOpenFile command?

<20221005221823.4cb5a7a0@lud1.home>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=20276&group=comp.lang.tcl#20276

  copy link   Newsgroups: comp.lang.tcl
Path: i2pn2.org!i2pn.org!aioe.org!jIHeyQZ0TSfMjc7nxbxWiw.user.46.165.242.75.POSTED!not-for-mail
From: no@no.no (Luc)
Newsgroups: comp.lang.tcl
Subject: Where is the ttk::getOpenFile command?
Date: Wed, 5 Oct 2022 22:18:23 -0300
Organization: Aioe.org NNTP Server
Message-ID: <20221005221823.4cb5a7a0@lud1.home>
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Injection-Info: gioia.aioe.org; logging-data="10813"; posting-host="jIHeyQZ0TSfMjc7nxbxWiw.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
X-Newsreader: Claws Mail 3.14.1 (GTK+ 2.24.31; x86_64-pc-linux-gnu)
X-Notice: Filtered by postfilter v. 0.9.2
 by: Luc - Thu, 6 Oct 2022 01:18 UTC

I have Tile loaded and I am using several of its widgets such as ttk::frame
or ttk::label, but when I try to use ttk::getOpenFile, a get an error saying
that the commmand does not exist.

A page at the wiki makes it sound like it's part of Tile, but it seems I
don't have it. I'm using the standard Tcl and Tk packages from the Debian
repository, version 8.6.0.

What am I doing wrong?

--
Luc

Re: Where is the ttk::getOpenFile command?

<thlih3$37bc6$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=20277&group=comp.lang.tcl#20277

  copy link   Newsgroups: comp.lang.tcl
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: rich@example.invalid (Rich)
Newsgroups: comp.lang.tcl
Subject: Re: Where is the ttk::getOpenFile command?
Date: Thu, 6 Oct 2022 03:37:07 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 24
Message-ID: <thlih3$37bc6$1@dont-email.me>
References: <20221005221823.4cb5a7a0@lud1.home>
Injection-Date: Thu, 6 Oct 2022 03:37:07 -0000 (UTC)
Injection-Info: reader01.eternal-september.org; posting-host="9701c045cb873d02d921d1011202fcbe";
logging-data="3386758"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/a0kpB/x08QnELUB2IMkNP"
User-Agent: tin/2.0.1-20111224 ("Achenvoir") (UNIX) (Linux/3.10.17 (x86_64))
Cancel-Lock: sha1:16DPEkZujA+6O6VSrQCnooeXHGI=
 by: Rich - Thu, 6 Oct 2022 03:37 UTC

Luc <no@no.no> wrote:
> I have Tile loaded and I am using several of its widgets such as
> ttk::frame or ttk::label, but when I try to use ttk::getOpenFile, a
> get an error saying that the commmand does not exist.
>
> A page at the wiki makes it sound like it's part of Tile, but it
> seems I don't have it. I'm using the standard Tcl and Tk packages
> from the Debian repository, version 8.6.0.
>
> What am I doing wrong?

If this is the wiki page of which you speak:
https://wiki.tcl-lang.org/page/File+selection+dialog+for+Tile

Then it appears that what you are doing wrong is failing to follow
these instructions located on that page:

Get the latest version here:
https://chiselapp.com/user/schelte/repository/fsdialog/tarball/fsdialog.tar.gz?uuid=trunk

Installation instructions: Dump the files in the package (not the
fsdialog directory) in a directory that is listed in $auto_path, or
lappend the directory containing the files to auto_path.

Re: Where is the ttk::getOpenFile command?

<20221006013712.3ef1ecce@lud1.home>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=20278&group=comp.lang.tcl#20278

  copy link   Newsgroups: comp.lang.tcl
Path: i2pn2.org!i2pn.org!aioe.org!jIHeyQZ0TSfMjc7nxbxWiw.user.46.165.242.75.POSTED!not-for-mail
From: no@no.no (Luc)
Newsgroups: comp.lang.tcl
Subject: Re: Where is the ttk::getOpenFile command?
Date: Thu, 6 Oct 2022 01:37:12 -0300
Organization: Aioe.org NNTP Server
Message-ID: <20221006013712.3ef1ecce@lud1.home>
References: <20221005221823.4cb5a7a0@lud1.home>
<thlih3$37bc6$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Injection-Info: gioia.aioe.org; logging-data="37494"; posting-host="jIHeyQZ0TSfMjc7nxbxWiw.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
X-Notice: Filtered by postfilter v. 0.9.2
X-Newsreader: Claws Mail 3.14.1 (GTK+ 2.24.31; x86_64-pc-linux-gnu)
 by: Luc - Thu, 6 Oct 2022 04:37 UTC

On Thu, 6 Oct 2022 03:37:07 -0000 (UTC), Rich wrote:

> Luc <no@no.no> wrote:
> > I have Tile loaded and I am using several of its widgets such as
> > ttk::frame or ttk::label, but when I try to use ttk::getOpenFile, a
> > get an error saying that the commmand does not exist.
> >
> > A page at the wiki makes it sound like it's part of Tile, but it
> > seems I don't have it. I'm using the standard Tcl and Tk packages
> > from the Debian repository, version 8.6.0.
> >
> > What am I doing wrong?
>
> If this is the wiki page of which you speak:
> https://wiki.tcl-lang.org/page/File+selection+dialog+for+Tile
>
> Then it appears that what you are doing wrong is failing to follow
> these instructions located on that page:
>
> Get the latest version here:
> https://chiselapp.com/user/schelte/repository/fsdialog/tarball/fsdialog.tar.gz?uuid=trunk
>
> Installation instructions: Dump the files in the package (not the
> fsdialog directory) in a directory that is listed in $auto_path, or
> lappend the directory containing the files to auto_path.
>
**************************

I've done that. It still tells me the command doesn't exist.

Then I tried 'package require fsdialog' in Tkcon. It prints "2.1".

But ttk::getOpenFile still doesn't exist.

Examining fsdialog.tcl, there seems to be a ttk::fsdialog::tk_getOpenFile
proc.

When I try that command in Tkcon, it doesn't say the command doesn't exist.

But Tkcon freezes and I have to kill it, and my Tkcon command history file
gets truncated.

When I try to load ttk::fsdialog::tk_getOpenFile from my script, nothing
happens.

--
Luc
>>

Re: Where is the ttk::getOpenFile command?

<nnd$245053e7$1f25f84a@98e6f5e8dfc50b5f>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=20279&group=comp.lang.tcl#20279

  copy link   Newsgroups: comp.lang.tcl
Date: Thu, 6 Oct 2022 09:49:07 +0200
MIME-Version: 1.0
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.0.2
Subject: Re: Where is the ttk::getOpenFile command?
Content-Language: en-US
Newsgroups: comp.lang.tcl
References: <20221005221823.4cb5a7a0@lud1.home> <thlih3$37bc6$1@dont-email.me>
<20221006013712.3ef1ecce@lud1.home>
From: nospam@wanadoo.nl (Schelte)
In-Reply-To: <20221006013712.3ef1ecce@lud1.home>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Message-ID: <nnd$245053e7$1f25f84a@98e6f5e8dfc50b5f>
Organization: KPN B.V.
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!newsreader4.netcologne.de!news.netcologne.de!peer01.ams1!peer.ams1.xlned.com!news.xlned.com!peer01.ams4!peer.am4.highwinds-media.com!news.highwinds-media.com!feed.abavia.com!abe005.abavia.com!abp003.abavia.com!news.kpn.nl!not-for-mail
Lines: 23
Injection-Date: Thu, 06 Oct 2022 09:49:07 +0200
Injection-Info: news.kpn.nl; mail-complaints-to="abuse@kpn.com"
X-Received-Bytes: 1720
 by: Schelte - Thu, 6 Oct 2022 07:49 UTC

On 06/10/2022 06:37, Luc wrote:
> Then I tried 'package require fsdialog' in Tkcon. It prints "2.1".
>
> But ttk::getOpenFile still doesn't exist.
>
> Examining fsdialog.tcl, there seems to be a ttk::fsdialog::tk_getOpenFile
> proc.

Rather than trying to read the source code, I would suggest to first
read the index page for the package on chiselapp
(http://chiselapp.com/user/schelte/repository/fsdialog): "The package is
now intended to be placed in a directory under auto_path. It can then be
loaded using [package require fsdialog]. This will replace the built-in
versions of tk_getOpenFile, tk_getSaveFile, and tk_chooseDirectory."

You already did the [package require fsdialog]. So now you can just use
tk_getOpenFile as you normally would.

Schelte

Re: Where is the ttk::getOpenFile command?

<20221006125843.1ef8391c@lud1.home>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=20280&group=comp.lang.tcl#20280

  copy link   Newsgroups: comp.lang.tcl
Path: i2pn2.org!i2pn.org!aioe.org!jIHeyQZ0TSfMjc7nxbxWiw.user.46.165.242.75.POSTED!not-for-mail
From: no@no.no (Luc)
Newsgroups: comp.lang.tcl
Subject: Re: Where is the ttk::getOpenFile command?
Date: Thu, 6 Oct 2022 12:58:43 -0300
Organization: Aioe.org NNTP Server
Message-ID: <20221006125843.1ef8391c@lud1.home>
References: <20221005221823.4cb5a7a0@lud1.home>
<thlih3$37bc6$1@dont-email.me>
<20221006013712.3ef1ecce@lud1.home>
<nnd$245053e7$1f25f84a@98e6f5e8dfc50b5f>
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Injection-Info: gioia.aioe.org; logging-data="49107"; posting-host="jIHeyQZ0TSfMjc7nxbxWiw.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
X-Newsreader: Claws Mail 3.14.1 (GTK+ 2.24.31; x86_64-pc-linux-gnu)
X-Notice: Filtered by postfilter v. 0.9.2
 by: Luc - Thu, 6 Oct 2022 15:58 UTC

On Thu, 6 Oct 2022 09:49:07 +0200, Schelte wrote:

> On 06/10/2022 06:37, Luc wrote:
> > Then I tried 'package require fsdialog' in Tkcon. It prints "2.1".
> >
> > But ttk::getOpenFile still doesn't exist.
> >
> > Examining fsdialog.tcl, there seems to be a
> > ttk::fsdialog::tk_getOpenFile proc.
>
> Rather than trying to read the source code, I would suggest to first
> read the index page for the package on chiselapp
> (http://chiselapp.com/user/schelte/repository/fsdialog): "The package
> is now intended to be placed in a directory under auto_path. It can
> then be loaded using [package require fsdialog]. This will replace
> the built-in versions of tk_getOpenFile, tk_getSaveFile, and
> tk_chooseDirectory."
>
> You already did the [package require fsdialog]. So now you can just
> use tk_getOpenFile as you normally would.
>
>
> Schelte
>
**************************

Thanks.

But it still doesn't work. When it's invoked by the bind keys, nothing
happens. A second press causes this error:

----------------
can't read "hull": no such variable
can't read "hull": no such variable
while executing
"bind $hull <Destroy> {}"
(class "::tk::MegawidgetClass" destructor line 7)
invoked from within
"next"
(class "::ttk::fsdialog::chooseDirectory" destructor line 5)
invoked from within
"next"
(class "::ttk::fsdialog::getSaveFile" destructor line 3)
----------------

I click OK and a second error pops up:

----------------
window name "__ttk_filedialog" already exists in parent
window name "__ttk_filedialog" already exists in parent
while executing
"toplevel $w -class TkFDialog"
(class "::ttk::fsdialog::getSaveFile" method "CreateHull" line 3)
invoked from within
"my CreateHull"
(class "::tk::MegawidgetClass" constructor line 12)
invoked from within
"next {*}$args"
(class "::ttk::fsdialog::chooseDirectory" constructor line 4)
invoked from within
"[self] create $w {*}$args"
(class "::tk::Megawidget" method "unknown" line 3)
invoked from within
"$cmd $w {*}$arglist -resultvariable $var"
(procedure "dialog" line 18)
invoked from within
"dialog getOpenFile __ttk_filedialog $args"
(procedure "tk_getOpenFile" line 2)
invoked from within
"tk_getOpenFile -filetypes $_filetypes -initialdir [file normalize $::MyApp::basedir ] -title "Open file..." "
(procedure "p.dialogFileOpen" line 12)
invoked from within
"p.dialogFileOpen"
(command bound to event)
----------------

Any ideas?

--
Luc
>>

Re: Where is the ttk::getOpenFile command?

<thmv58$3dogn$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=20281&group=comp.lang.tcl#20281

  copy link   Newsgroups: comp.lang.tcl
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: rich@example.invalid (Rich)
Newsgroups: comp.lang.tcl
Subject: Re: Where is the ttk::getOpenFile command?
Date: Thu, 6 Oct 2022 16:18:48 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 14
Message-ID: <thmv58$3dogn$1@dont-email.me>
References: <20221005221823.4cb5a7a0@lud1.home> <thlih3$37bc6$1@dont-email.me> <20221006013712.3ef1ecce@lud1.home> <nnd$245053e7$1f25f84a@98e6f5e8dfc50b5f> <20221006125843.1ef8391c@lud1.home>
Injection-Date: Thu, 6 Oct 2022 16:18:48 -0000 (UTC)
Injection-Info: reader01.eternal-september.org; posting-host="9701c045cb873d02d921d1011202fcbe";
logging-data="3596823"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19j0OQg/ws1z17RdeYHKQa2"
User-Agent: tin/2.0.1-20111224 ("Achenvoir") (UNIX) (Linux/3.10.17 (x86_64))
Cancel-Lock: sha1:L6xBHLKvfrSBKBxY1b7Oi+7hTCA=
 by: Rich - Thu, 6 Oct 2022 16:18 UTC

Luc <no@no.no> wrote:
> But it still doesn't work. When it's invoked by the bind keys, nothing
> happens. A second press causes this error:
>
> ----------------
> can't read "hull": no such variable
> can't read "hull": no such variable
> while executing
> "bind $hull <Destroy> {}"
>
> Any ideas?

'hull' sounds like SNIT. Do you have Tcllib installed, which contains
SNIT? Beyond that, I'm out of ideas.

Re: Where is the ttk::getOpenFile command?

<20221006135250.74eed96f@lud1.home>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=20282&group=comp.lang.tcl#20282

  copy link   Newsgroups: comp.lang.tcl
Path: i2pn2.org!i2pn.org!news.niel.me!aioe.org!jIHeyQZ0TSfMjc7nxbxWiw.user.46.165.242.75.POSTED!not-for-mail
From: no@no.no (Luc)
Newsgroups: comp.lang.tcl
Subject: Re: Where is the ttk::getOpenFile command?
Date: Thu, 6 Oct 2022 13:52:50 -0300
Organization: Aioe.org NNTP Server
Message-ID: <20221006135250.74eed96f@lud1.home>
References: <20221005221823.4cb5a7a0@lud1.home>
<thlih3$37bc6$1@dont-email.me>
<20221006013712.3ef1ecce@lud1.home>
<nnd$245053e7$1f25f84a@98e6f5e8dfc50b5f>
<20221006125843.1ef8391c@lud1.home>
<thmv58$3dogn$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Injection-Info: gioia.aioe.org; logging-data="40340"; posting-host="jIHeyQZ0TSfMjc7nxbxWiw.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
X-Notice: Filtered by postfilter v. 0.9.2
X-Newsreader: Claws Mail 3.14.1 (GTK+ 2.24.31; x86_64-pc-linux-gnu)
 by: Luc - Thu, 6 Oct 2022 16:52 UTC

On Thu, 6 Oct 2022 16:18:48 -0000 (UTC), Rich wrote:

> Luc <no@no.no> wrote:
> > But it still doesn't work. When it's invoked by the bind keys,
> > nothing happens. A second press causes this error:
> >
> > ----------------
> > can't read "hull": no such variable
> > can't read "hull": no such variable
> > while executing
> > "bind $hull <Destroy> {}"
> >
> > Any ideas?
>
> 'hull' sounds like SNIT. Do you have Tcllib installed, which
> contains SNIT? Beyond that, I'm out of ideas.
**************************

Yes. Tcllib 1.18 and Snit 2.3.2.

--
Luc
>>

Re: Where is the ttk::getOpenFile command?

<1r6dnVw6eZ17uKL-nZ2dnZfqnPtj4p2d@giganews.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=20284&group=comp.lang.tcl#20284

  copy link   Newsgroups: comp.lang.tcl
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border-2.nntp.ord.giganews.com!nntp.giganews.com!Xl.tags.giganews.com!local-1.nntp.ord.giganews.com!news.giganews.com.POSTED!not-for-mail
NNTP-Posting-Date: Thu, 06 Oct 2022 19:00:54 +0000
MIME-Version: 1.0
From: heller@deepsoft.com (Robert Heller)
Organization: Deepwoods Software
X-Newsreader: TkNews 3.0 (1.2.14)
Subject: Re: Where is the ttk::getOpenFile command?
In-Reply-To: <20221006135250.74eed96f@lud1.home>
References: <20221005221823.4cb5a7a0@lud1.home>??<thlih3$37bc6$1@dont-email.me>??<20221006013712.3ef1ecce@lud1.home>??<nnd$245053e7$1f25f84a@98e6f5e8dfc50b5f>??<20221006125843.1ef8391c@lud1.home>??<thmv58$3dogn$1@dont-email.me>
<20221006135250.74eed96f@lud1.home>
Newsgroups: comp.lang.tcl
Content-Type: text/plain;
charset="us-ascii"
Originator: heller@sharky4.deepsoft.com
Message-ID: <1r6dnVw6eZ17uKL-nZ2dnZfqnPtj4p2d@giganews.com>
Date: Thu, 06 Oct 2022 19:00:54 +0000
Lines: 33
X-Usenet-Provider: http://www.giganews.com
X-Trace: sv3-x0kgAkgTEyqc55PoAj+kJzsuJtnCZILPMFue+aktU5TF/90XqljqKQj3mlT7+j0BHL+SMxX8oa3ZwBi!3eqIXd84OM9+JbuT0G8TekuitJXyOcGLoxjvSVnyig6elTnAfXaKH/EWIp9b1SoR85LKRzweUo8k!Ce4=
X-Complaints-To: abuse@giganews.com
X-DMCA-Notifications: http://www.giganews.com/info/dmca.html
X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers
X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly
X-Postfilter: 1.3.40
 by: Robert Heller - Thu, 6 Oct 2022 19:00 UTC

At Thu, 6 Oct 2022 13:52:50 -0300 Luc <no@no.no> wrote:

>
> On Thu, 6 Oct 2022 16:18:48 -0000 (UTC), Rich wrote:
>
> > Luc <no@no.no> wrote:
> > > But it still doesn't work. When it's invoked by the bind keys,
> > > nothing happens. A second press causes this error:
> > >
> > > ----------------
> > > can't read "hull": no such variable
> > > can't read "hull": no such variable
> > > while executing
> > > "bind $hull <Destroy> {}"
> > >
> > > Any ideas?
> >
> > 'hull' sounds like SNIT. Do you have Tcllib installed, which
> > contains SNIT? Beyond that, I'm out of ideas.
> **************************
>
> Yes. Tcllib 1.18 and Snit 2.3.2.

So somewhere, you have a bad (buggy) SNIT Widget or WidgetAdaptor...

>

--
Robert Heller -- Cell: 413-658-7953 GV: 978-633-5364
Deepwoods Software -- Custom Software Services
http://www.deepsoft.com/ -- Linux Administration Services
heller@deepsoft.com -- Webhosting Services

Re: Where is the ttk::getOpenFile command?

<nnd$0827956b$386e7011@20f52a2b51cefe07>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=20285&group=comp.lang.tcl#20285

  copy link   Newsgroups: comp.lang.tcl
Date: Fri, 7 Oct 2022 10:24:51 +0200
MIME-Version: 1.0
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.0.2
Subject: Re: Where is the ttk::getOpenFile command?
Newsgroups: comp.lang.tcl
References: <20221005221823.4cb5a7a0@lud1.home> <thlih3$37bc6$1@dont-email.me>
<20221006013712.3ef1ecce@lud1.home> <nnd$245053e7$1f25f84a@98e6f5e8dfc50b5f>
<20221006125843.1ef8391c@lud1.home> <thmv58$3dogn$1@dont-email.me>
<20221006135250.74eed96f@lud1.home>
Content-Language: en-US
From: nospam@wanadoo.nl (Schelte)
In-Reply-To: <20221006135250.74eed96f@lud1.home>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Message-ID: <nnd$0827956b$386e7011@20f52a2b51cefe07>
Organization: KPN B.V.
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer02.iad!feed-me.highwinds-media.com!peer02.ams1!peer.ams1.xlned.com!news.xlned.com!peer01.ams4!peer.am4.highwinds-media.com!news.highwinds-media.com!feed.abavia.com!abe005.abavia.com!abp003.abavia.com!news.kpn.nl!not-for-mail
Lines: 34
Injection-Date: Fri, 07 Oct 2022 10:24:52 +0200
Injection-Info: news.kpn.nl; mail-complaints-to="abuse@kpn.com"
X-Received-Bytes: 2033
 by: Schelte - Fri, 7 Oct 2022 08:24 UTC

On 06/10/2022 18:52, Luc wrote:
> On Thu, 6 Oct 2022 16:18:48 -0000 (UTC), Rich wrote:
>> 'hull' sounds like SNIT. Do you have Tcllib installed, which
>> contains SNIT? Beyond that, I'm out of ideas.
> **************************
>
> Yes. Tcllib 1.18 and Snit 2.3.2.
>
Fsdialog doesn't use SNIT. It works with just the base Tcl/Tk. It will
benefit from having fswatch available, but doesn't require it.

Can you show exactly what you are doing? Based on just an error message
without information what led to the error, it is difficult to investigate.

For example: The following works fine for me:

# Install the package
$ mkdir -p ~/fsdlg
$ cd ~/fsdlg
$ wget -qO-
https://chiselapp.com/user/schelte/repository/fsdialog/tarball/trunk/fsdialog.tar.gz
| tar xzv

# Use the package
$ wish
% lappend auto_path ~/fsdlg
% package require fsdialog
% tk_getOpenFile

Schelte

Re: Where is the ttk::getOpenFile command?

<thpb99$1e2t$1@gioia.aioe.org>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=20286&group=comp.lang.tcl#20286

  copy link   Newsgroups: comp.lang.tcl
Path: i2pn2.org!i2pn.org!aioe.org!a5rWVvs5S5ZXUwkNcVnRMw.user.46.165.242.91.POSTED!not-for-mail
From: saitology9@gmail.com (saitology9)
Newsgroups: comp.lang.tcl
Subject: Re: Where is the ttk::getOpenFile command?
Date: Fri, 7 Oct 2022 09:58:01 -0400
Organization: Aioe.org NNTP Server
Message-ID: <thpb99$1e2t$1@gioia.aioe.org>
References: <20221005221823.4cb5a7a0@lud1.home> <thlih3$37bc6$1@dont-email.me>
<20221006013712.3ef1ecce@lud1.home> <nnd$245053e7$1f25f84a@98e6f5e8dfc50b5f>
<20221006125843.1ef8391c@lud1.home> <thmv58$3dogn$1@dont-email.me>
<20221006135250.74eed96f@lud1.home> <nnd$0827956b$386e7011@20f52a2b51cefe07>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Info: gioia.aioe.org; logging-data="47197"; posting-host="a5rWVvs5S5ZXUwkNcVnRMw.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.3.0
Content-Language: en-US
X-Notice: Filtered by postfilter v. 0.9.2
 by: saitology9 - Fri, 7 Oct 2022 13:58 UTC

On 10/7/22 4:24 AM, Schelte wrote:
>
> For example: The following works fine for me:
>
> # Install the package
> $ mkdir -p ~/fsdlg
> $ cd ~/fsdlg
> $ wget -qO-
> https://chiselapp.com/user/schelte/repository/fsdialog/tarball/trunk/fsdialog.tar.gz | tar xzv
>
> # Use the package
> $ wish
> % lappend auto_path ~/fsdlg
> % package require fsdialog
> % tk_getOpenFile
>

I can confirm that this sequence works for me on MS Windows, Tcl/Tk 8.6.10.

Re: Where is the ttk::getOpenFile command?

<thpbii$1jd5$1@gioia.aioe.org>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=20287&group=comp.lang.tcl#20287

  copy link   Newsgroups: comp.lang.tcl
Path: i2pn2.org!i2pn.org!aioe.org!a5rWVvs5S5ZXUwkNcVnRMw.user.46.165.242.91.POSTED!not-for-mail
From: saitology9@gmail.com (saitology9)
Newsgroups: comp.lang.tcl
Subject: Re: Where is the ttk::getOpenFile command?
Date: Fri, 7 Oct 2022 10:02:58 -0400
Organization: Aioe.org NNTP Server
Message-ID: <thpbii$1jd5$1@gioia.aioe.org>
References: <20221005221823.4cb5a7a0@lud1.home> <thlih3$37bc6$1@dont-email.me>
<20221006013712.3ef1ecce@lud1.home> <nnd$245053e7$1f25f84a@98e6f5e8dfc50b5f>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Info: gioia.aioe.org; logging-data="52645"; posting-host="a5rWVvs5S5ZXUwkNcVnRMw.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.3.0
X-Notice: Filtered by postfilter v. 0.9.2
Content-Language: en-US
 by: saitology9 - Fri, 7 Oct 2022 14:02 UTC

On 10/6/22 3:49 AM, Schelte wrote:
>
> This will replace the built-in
> versions of tk_getOpenFile, tk_getSaveFile, and tk_chooseDirectory."
>

Can I make a recommendation? I see that the package does a [namespace
export] to replace the built-in versions. It would be better if the user
was in charge of this action instead of it being automatic. You could
even export them as "fs_getOpenFile" and so on.

Re: Where is the ttk::getOpenFile command?

<nnd$73823041$20705765@320d32dce4aa10b5>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=20288&group=comp.lang.tcl#20288

  copy link   Newsgroups: comp.lang.tcl
Date: Fri, 7 Oct 2022 17:02:16 +0200
MIME-Version: 1.0
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.0.2
Subject: Re: Where is the ttk::getOpenFile command?
Content-Language: en-US
Newsgroups: comp.lang.tcl
References: <20221005221823.4cb5a7a0@lud1.home> <thlih3$37bc6$1@dont-email.me>
<20221006013712.3ef1ecce@lud1.home> <nnd$245053e7$1f25f84a@98e6f5e8dfc50b5f>
<thpbii$1jd5$1@gioia.aioe.org>
From: nospam@wanadoo.nl (Schelte)
In-Reply-To: <thpbii$1jd5$1@gioia.aioe.org>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Message-ID: <nnd$73823041$20705765@320d32dce4aa10b5>
Organization: KPN B.V.
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!newsreader4.netcologne.de!news.netcologne.de!peer01.ams1!peer.ams1.xlned.com!news.xlned.com!peer03.ams4!peer.am4.highwinds-media.com!news.highwinds-media.com!feed.abavia.com!abe006.abavia.com!abp003.abavia.com!news.kpn.nl!not-for-mail
Lines: 24
Injection-Date: Fri, 07 Oct 2022 17:02:16 +0200
Injection-Info: news.kpn.nl; mail-complaints-to="abuse@kpn.com"
X-Received-Bytes: 2035
 by: Schelte - Fri, 7 Oct 2022 15:02 UTC

On 07/10/2022 16:02, saitology9 wrote:
> Can I make a recommendation? I see that the package does a [namespace
> export] to replace the built-in versions. It would be better if the user
> was in charge of this action instead of it being automatic.  You could
> even export them as "fs_getOpenFile" and so on.
>
Citation needed, as wikipedia would say. How would that be "better"? The
package is presented as a drop-in replacement for the various file
selection commands. Your suggestion would require the user to do extra
work to replace the original commands, or modify all calls from
tk_getOpenFile to fs_getOpenFile, etc. The user is in charge, by
deciding to load the package or not.

I fail to see a scenario where someone would want to mix the two
implementations in a real application. Perhaps someone may like to
evaluate the package by comparing the two versions. But that can be done
by renaming the original commands before loading the package, or using
separate interpreters.

Schelte.

Re: Where is the ttk::getOpenFile command?

<thpjce$3om74$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=20289&group=comp.lang.tcl#20289

  copy link   Newsgroups: comp.lang.tcl
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: nospam.nurdglaw@gmail.com (Alan Grunwald)
Newsgroups: comp.lang.tcl
Subject: Re: Where is the ttk::getOpenFile command?
Date: Fri, 7 Oct 2022 17:16:14 +0100
Organization: A noiseless patient Spider
Lines: 53
Message-ID: <thpjce$3om74$1@dont-email.me>
References: <20221005221823.4cb5a7a0@lud1.home> <thlih3$37bc6$1@dont-email.me>
<20221006013712.3ef1ecce@lud1.home> <nnd$245053e7$1f25f84a@98e6f5e8dfc50b5f>
<20221006125843.1ef8391c@lud1.home> <thmv58$3dogn$1@dont-email.me>
<20221006135250.74eed96f@lud1.home> <nnd$0827956b$386e7011@20f52a2b51cefe07>
<thpb99$1e2t$1@gioia.aioe.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Fri, 7 Oct 2022 16:16:14 -0000 (UTC)
Injection-Info: reader01.eternal-september.org; posting-host="5165cbd6d7241e635cb75233ded9a247";
logging-data="3954916"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/DJ273CYEdTuQsUtx3rnygSh0ofDlnH5g="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.2.2
Cancel-Lock: sha1:N347eyOhc2uMFRKBFefJvYrAMTA=
In-Reply-To: <thpb99$1e2t$1@gioia.aioe.org>
Content-Language: en-US
 by: Alan Grunwald - Fri, 7 Oct 2022 16:16 UTC

On 07/10/2022 14:58, saitology9 wrote:
> On 10/7/22 4:24 AM, Schelte wrote:
>>
>> For example: The following works fine for me:
>>
>> # Install the package
>> $ mkdir -p ~/fsdlg
>> $ cd ~/fsdlg
>> $ wget -qO-
>> https://chiselapp.com/user/schelte/repository/fsdialog/tarball/trunk/fsdialog.tar.gz | tar xzv
>>
>> # Use the package
>> $ wish
>> % lappend auto_path ~/fsdlg
>> % package require fsdialog
>> % tk_getOpenFile
>>
>
> I can confirm that this sequence works for me on MS Windows, Tcl/Tk 8.6.10.
>
>
>
>
It works fine for me too. However...

I generally use tkcon rather than wish, and when I tried using tkcon "as
usual" I had the problem described by the OP.

I then tried with tkcon as follows:

$ tclsh <-- Typed into bash
% tkcon show <-- Typed to tclsh
% lappend auto_path ~/fsdlg \
% package require fsdialog > <-- typed to tkcon
% tk_getOpenFile / console

which worked just fine.

It turned out that doing things "as usual" included executing

wm withdraw .

Is the OP doing something similar? If so, then assuming he creates
another toplevel named, say, .myTopLevel then

tk_getOpenFile -parent .myTopLevel

ought to do the trick.

Alan

Re: Where is the ttk::getOpenFile command?

<thpjjc$3om74$2@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=20290&group=comp.lang.tcl#20290

  copy link   Newsgroups: comp.lang.tcl
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: nospam.nurdglaw@gmail.com (Alan Grunwald)
Newsgroups: comp.lang.tcl
Subject: Re: Where is the ttk::getOpenFile command?
Date: Fri, 7 Oct 2022 17:19:56 +0100
Organization: A noiseless patient Spider
Lines: 26
Message-ID: <thpjjc$3om74$2@dont-email.me>
References: <20221005221823.4cb5a7a0@lud1.home> <thlih3$37bc6$1@dont-email.me>
<20221006013712.3ef1ecce@lud1.home> <nnd$245053e7$1f25f84a@98e6f5e8dfc50b5f>
<thpbii$1jd5$1@gioia.aioe.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Fri, 7 Oct 2022 16:19:56 -0000 (UTC)
Injection-Info: reader01.eternal-september.org; posting-host="5165cbd6d7241e635cb75233ded9a247";
logging-data="3954916"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/V49+jqI5T3CfNGgl4Lb6RoZnWWal3bb8="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.2.2
Cancel-Lock: sha1:tPL6083eKEmJxpc4WpEZlFcAHAw=
Content-Language: en-US
In-Reply-To: <thpbii$1jd5$1@gioia.aioe.org>
 by: Alan Grunwald - Fri, 7 Oct 2022 16:19 UTC

On 07/10/2022 15:02, saitology9 wrote:
> On 10/6/22 3:49 AM, Schelte wrote:
>>
>> This will replace the built-in versions of tk_getOpenFile,
>> tk_getSaveFile, and tk_chooseDirectory."
>>
>
> Can I make a recommendation? I see that the package does a [namespace
> export] to replace the built-in versions. It would be better if the user
> was in charge of this action instead of it being automatic.  You could
> even export them as "fs_getOpenFile" and so on.
>
>
I think I disagree.

I would argue that be executing

package require fsdialog

the user is requesting that tk_getOpenFile (and friends) should be replaced.

I wasn't sure at first, but on checking, I see that the manual pages are
pretty explicit about this - it's the first sentence of the description
after all.

Re: Where is the ttk::getOpenFile command?

<thpnng$1o1$1@gioia.aioe.org>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=20291&group=comp.lang.tcl#20291

  copy link   Newsgroups: comp.lang.tcl
Path: i2pn2.org!i2pn.org!aioe.org!a5rWVvs5S5ZXUwkNcVnRMw.user.46.165.242.91.POSTED!not-for-mail
From: saitology9@gmail.com (saitology9)
Newsgroups: comp.lang.tcl
Subject: Re: Where is the ttk::getOpenFile command?
Date: Fri, 7 Oct 2022 13:30:24 -0400
Organization: Aioe.org NNTP Server
Message-ID: <thpnng$1o1$1@gioia.aioe.org>
References: <20221005221823.4cb5a7a0@lud1.home> <thlih3$37bc6$1@dont-email.me>
<20221006013712.3ef1ecce@lud1.home> <nnd$245053e7$1f25f84a@98e6f5e8dfc50b5f>
<thpbii$1jd5$1@gioia.aioe.org> <nnd$73823041$20705765@320d32dce4aa10b5>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Info: gioia.aioe.org; logging-data="1793"; posting-host="a5rWVvs5S5ZXUwkNcVnRMw.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.3.0
X-Notice: Filtered by postfilter v. 0.9.2
Content-Language: en-US
 by: saitology9 - Fri, 7 Oct 2022 17:30 UTC

On 10/7/22 11:02 AM, Schelte wrote:
> On 07/10/2022 16:02, saitology9 wrote:
>> Can I make a recommendation? I see that the package does a [namespace
>> export] to replace the built-in versions. It would be better if the
>> user was in charge of this action instead of it being automatic.  You
>> could even export them as "fs_getOpenFile" and so on.
>>
> Citation needed, as wikipedia would say. How would that be "better"?

Indeed :-)

I wasn't really sure what it was or why it was needed. I was just
surprised that it took over a core feature. which turned out to be its
main goal.

Re: Where is the ttk::getOpenFile command?

<20221007152312.60cc0eac@lud1.home>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=20292&group=comp.lang.tcl#20292

  copy link   Newsgroups: comp.lang.tcl
Path: i2pn2.org!i2pn.org!aioe.org!jIHeyQZ0TSfMjc7nxbxWiw.user.46.165.242.75.POSTED!not-for-mail
From: no@no.no (Luc)
Newsgroups: comp.lang.tcl
Subject: Re: Where is the ttk::getOpenFile command?
Date: Fri, 7 Oct 2022 15:23:12 -0300
Organization: Aioe.org NNTP Server
Message-ID: <20221007152312.60cc0eac@lud1.home>
References: <20221005221823.4cb5a7a0@lud1.home>
<thlih3$37bc6$1@dont-email.me>
<20221006013712.3ef1ecce@lud1.home>
<nnd$245053e7$1f25f84a@98e6f5e8dfc50b5f>
<20221006125843.1ef8391c@lud1.home>
<thmv58$3dogn$1@dont-email.me>
<20221006135250.74eed96f@lud1.home>
<nnd$0827956b$386e7011@20f52a2b51cefe07>
<thpb99$1e2t$1@gioia.aioe.org>
<thpjce$3om74$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Injection-Info: gioia.aioe.org; logging-data="22177"; posting-host="jIHeyQZ0TSfMjc7nxbxWiw.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
X-Notice: Filtered by postfilter v. 0.9.2
X-Newsreader: Claws Mail 3.14.1 (GTK+ 2.24.31; x86_64-pc-linux-gnu)
 by: Luc - Fri, 7 Oct 2022 18:23 UTC

This conversation has become more interesting than I expected.

First...

------------
On Fri, 7 Oct 2022 10:24:51 +0200, Schelte wrote:

> Fsdialog doesn't use SNIT. It works with just the base Tcl/Tk. It
> will benefit from having fswatch available, but doesn't require it.
>
> Can you show exactly what you are doing? Based on just an error
> message without information what led to the error, it is difficult to
> investigate.
>
> For example: The following works fine for me:
>
> # Install the package
> $ mkdir -p ~/fsdlg
> $ cd ~/fsdlg
> $ wget -qO-
> https://chiselapp.com/user/schelte/repository/fsdialog/tarball/trunk/fsdialog.tar.gz
> | tar xzv
>
> # Use the package
> $ wish
> % lappend auto_path ~/fsdlg
> % package require fsdialog
> % tk_getOpenFile
>
> Schelte
------------

Thank you for your attention, Schelte.

Well, yes. When I write a very bare bones script with fsdialog, it works
as expected. I've finally seen what it looks like. But it won't work in my
application.

"Show exactly what I'm doing" is complicated because it's an application,
it's a lot of code for me to post here and for anyone to pore over for free.

But then...

------------
On Fri, 7 Oct 2022 17:16:14 +0100, Alan Grunwald wrote:

> It works fine for me too. However...
>
> I generally use tkcon rather than wish, and when I tried using tkcon
> "as usual" I had the problem described by the OP.
>
> I then tried with tkcon as follows:
>
> $ tclsh <-- Typed into bash
> % tkcon show <-- Typed to tclsh
> % lappend auto_path ~/fsdlg \
> % package require fsdialog > <-- typed to tkcon
> % tk_getOpenFile / console
>
> which worked just fine.
>
> It turned out that doing things "as usual" included executing
>
> wm withdraw .
>
> Is the OP doing something similar? If so, then assuming he creates
> another toplevel named, say, .myTopLevel then
>
> tk_getOpenFile -parent .myTopLevel
>
> ought to do the trick.
>
> Alan
------------

That did do the trick. I declared the top level again and alas, it works.

Or does it?

No. The open file dialog pops up, but then I select a file and... nothing
happens. The content of the file was supposed to be inserted into a text
widget, which works as expected with stock Tk. The file is not loaded with
fsdialog.

Plus, the open dialog only pops up once. If I try to open it a second time,
the same two errors I had reported previously happen again. It doesn't
matter whether I do select a file or rather dismiss the dialog with Esc.

I'm sorry for this trouble. I've always been very good at breaking things.
It's sort of a gift.

--
Luc
>>

Re: Where is the ttk::getOpenFile command?

<thpvc6$1s6p$1@gioia.aioe.org>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=20293&group=comp.lang.tcl#20293

  copy link   Newsgroups: comp.lang.tcl
Path: i2pn2.org!i2pn.org!aioe.org!a5rWVvs5S5ZXUwkNcVnRMw.user.46.165.242.91.POSTED!not-for-mail
From: saitology9@gmail.com (saitology9)
Newsgroups: comp.lang.tcl
Subject: Re: Where is the ttk::getOpenFile command?
Date: Fri, 7 Oct 2022 15:40:54 -0400
Organization: Aioe.org NNTP Server
Message-ID: <thpvc6$1s6p$1@gioia.aioe.org>
References: <20221005221823.4cb5a7a0@lud1.home> <thlih3$37bc6$1@dont-email.me>
<20221006013712.3ef1ecce@lud1.home> <nnd$245053e7$1f25f84a@98e6f5e8dfc50b5f>
<20221006125843.1ef8391c@lud1.home> <thmv58$3dogn$1@dont-email.me>
<20221006135250.74eed96f@lud1.home> <nnd$0827956b$386e7011@20f52a2b51cefe07>
<thpb99$1e2t$1@gioia.aioe.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Info: gioia.aioe.org; logging-data="61657"; posting-host="a5rWVvs5S5ZXUwkNcVnRMw.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.3.0
X-Notice: Filtered by postfilter v. 0.9.2
Content-Language: en-US
 by: saitology9 - Fri, 7 Oct 2022 19:40 UTC

On 10/7/22 9:58 AM, saitology9 wrote:
> On 10/7/22 4:24 AM, Schelte wrote:
>>
>> For example: The following works fine for me:
>>

I had some free time this afternoon :-)
I found a bug in fsdialog: in the proc ttk::fsdialog::dialog. If the
-parent option is not specified, it simply defaults to ".". This is
fine if the window is mapped. If not, then fsdialog causes weird
errors. It locks up tkcon, it messes up the main application, etc.

Here is a solution that will fix it, as reported by diff:

87c87
< } else {
---
> } elseif {[winfo ismapped .]} {
88a89,103
> } else {
> # use first mapped toplevel found
> set parent ""
> foreach w [winfo children .] {
> if {[winfo ismapped $w]} {
> set parent $w
> break
> }
> }
> if {$parent eq ""} {
> # no mapped toplevels
> # deiconify the main one
> wm deiconify .
> set parent .
> }

Re: Where is the ttk::getOpenFile command?

<nnd$34ac7d06$2b609219@a23d673852c48793>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=20295&group=comp.lang.tcl#20295

  copy link   Newsgroups: comp.lang.tcl
Date: Fri, 7 Oct 2022 22:12:38 +0200
MIME-Version: 1.0
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.0.2
Subject: Re: Where is the ttk::getOpenFile command?
Content-Language: en-US
Newsgroups: comp.lang.tcl
References: <20221005221823.4cb5a7a0@lud1.home> <thlih3$37bc6$1@dont-email.me>
<20221006013712.3ef1ecce@lud1.home> <nnd$245053e7$1f25f84a@98e6f5e8dfc50b5f>
<20221006125843.1ef8391c@lud1.home> <thmv58$3dogn$1@dont-email.me>
<20221006135250.74eed96f@lud1.home> <nnd$0827956b$386e7011@20f52a2b51cefe07>
<thpb99$1e2t$1@gioia.aioe.org> <thpjce$3om74$1@dont-email.me>
<20221007152312.60cc0eac@lud1.home>
From: nospam@wanadoo.nl (Schelte)
In-Reply-To: <20221007152312.60cc0eac@lud1.home>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Message-ID: <nnd$34ac7d06$2b609219@a23d673852c48793>
Organization: KPN B.V.
Path: i2pn2.org!i2pn.org!news.swapon.de!newsreader4.netcologne.de!news.netcologne.de!peer01.ams1!peer.ams1.xlned.com!news.xlned.com!peer01.ams4!peer.am4.highwinds-media.com!news.highwinds-media.com!feed.abavia.com!abe006.abavia.com!abp001.abavia.com!news.kpn.nl!not-for-mail
Lines: 43
Injection-Date: Fri, 07 Oct 2022 22:12:38 +0200
Injection-Info: news.kpn.nl; mail-complaints-to="abuse@kpn.com"
X-Received-Bytes: 2811
 by: Schelte - Fri, 7 Oct 2022 20:12 UTC

On 07/10/2022 20:23, Luc wrote:
> I'm sorry for this trouble. I've always been very good at breaking things.
> It's sort of a gift.

If there is a bug, I like to know about it and fix it.

As more pieces of the puzzle become clear, I have been able to evoke the
error messages you reported. This is what I did:

package require fsdialog
wm withdraw .
toplevel .top
bind .top <Control-o> p.dialogFileOpen
proc p.dialogFileOpen {} {
puts [tk_getOpenFile]
}

Pressing Ctrl-O while .top has focus creates the tk_getOpenFile window.
But because the parent is withdrawn, the window is not visible. Pressing
Ctrl-O again attempts to create the window once more. This fails because
it already exists. When the construction fails, the destructor is
invoked. The destructor finds the existing window and tries to destroy
it, but lacks the necessary variables because it wasn't this object that
created it. That causes the error from the destructor.

The second error you get is the original error; trying to create
__ttk_filedialog when it already exists. So the problem boils down to
the user trying to open the file dialog while it is already open. This
should somehow be prevented.

I don't yet understand why nothing happens when you select a file. It
seems that the dialog doesn't fully close, but somehow hangs around.
Which is why you get the errors again when you try to open the dialog a
second time.

Is the window you specified in the -parent option visible? Or did you
withdraw that one as well?

Schelte.

Re: Where is the ttk::getOpenFile command?

<20221007180916.0a7eee89@lud1.home>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=20297&group=comp.lang.tcl#20297

  copy link   Newsgroups: comp.lang.tcl
Path: i2pn2.org!i2pn.org!aioe.org!jIHeyQZ0TSfMjc7nxbxWiw.user.46.165.242.75.POSTED!not-for-mail
From: no@no.no (Luc)
Newsgroups: comp.lang.tcl
Subject: Re: Where is the ttk::getOpenFile command?
Date: Fri, 7 Oct 2022 18:09:16 -0300
Organization: Aioe.org NNTP Server
Message-ID: <20221007180916.0a7eee89@lud1.home>
References: <20221005221823.4cb5a7a0@lud1.home>
<thlih3$37bc6$1@dont-email.me>
<20221006013712.3ef1ecce@lud1.home>
<nnd$245053e7$1f25f84a@98e6f5e8dfc50b5f>
<20221006125843.1ef8391c@lud1.home>
<thmv58$3dogn$1@dont-email.me>
<20221006135250.74eed96f@lud1.home>
<nnd$0827956b$386e7011@20f52a2b51cefe07>
<thpb99$1e2t$1@gioia.aioe.org>
<thpjce$3om74$1@dont-email.me>
<20221007152312.60cc0eac@lud1.home>
<nnd$34ac7d06$2b609219@a23d673852c48793>
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Injection-Info: gioia.aioe.org; logging-data="2190"; posting-host="jIHeyQZ0TSfMjc7nxbxWiw.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
X-Newsreader: Claws Mail 3.14.1 (GTK+ 2.24.31; x86_64-pc-linux-gnu)
X-Notice: Filtered by postfilter v. 0.9.2
 by: Luc - Fri, 7 Oct 2022 21:09 UTC

On Fri, 7 Oct 2022 22:12:38 +0200, Schelte wrote:

> On 07/10/2022 20:23, Luc wrote:
> > I'm sorry for this trouble. I've always been very good at breaking
> > things. It's sort of a gift.
>
> If there is a bug, I like to know about it and fix it.
>
> As more pieces of the puzzle become clear, I have been able to evoke the
> error messages you reported. This is what I did:
>
> package require fsdialog
> wm withdraw .
> toplevel .top
> bind .top <Control-o> p.dialogFileOpen
> proc p.dialogFileOpen {} {
> puts [tk_getOpenFile]
> }
>
> Pressing Ctrl-O while .top has focus creates the tk_getOpenFile window.
> But because the parent is withdrawn, the window is not visible. Pressing
> Ctrl-O again attempts to create the window once more. This fails because
> it already exists. When the construction fails, the destructor is
> invoked. The destructor finds the existing window and tries to destroy
> it, but lacks the necessary variables because it wasn't this object that
> created it. That causes the error from the destructor.
>
> The second error you get is the original error; trying to create
> __ttk_filedialog when it already exists. So the problem boils down to
> the user trying to open the file dialog while it is already open. This
> should somehow be prevented.
>
> I don't yet understand why nothing happens when you select a file. It
> seems that the dialog doesn't fully close, but somehow hangs around.
> Which is why you get the errors again when you try to open the dialog a
> second time.
>
> Is the window you specified in the -parent option visible? Or did you
> withdraw that one as well?
>
>
> Schelte.

I'm really glad you figured all out and that my incident turned out to be
useful in some way.

Yes, I do wm withdraw . right in the beginning of everything.

--
Luc
>>


devel / comp.lang.tcl / Re: Where is the ttk::getOpenFile command?

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor