Skip Menu |

This queue is for tickets about the Tk CPAN distribution.

Report information
The Basics
Id: 53002
Status: open
Priority: 0/
Queue: Tk

People
Owner: Nobody in particular
Requestors: meir [...] guttman.co.il
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



CC: 'Slaven Rezic' <slaven [...] rezic.de>
Subject: chooseDirectory erases the "-initialDir" variable when "Cancel" is clicked
Date: Wed, 23 Dec 2009 12:36:12 +0200
To: bug-Tk [...] rt.cpan.org
From: Meir Guttman <meir [...] guttman.co.il>

Message body is not shown because sender requested not to inline it.

Download image003.jpg
image/jpeg 6k

Message body is not shown because sender requested not to inline it.

Download image004.jpg
image/jpeg 5.5k

Message body is not shown because sender requested not to inline it.

Dear Slaven, It's me again, from the "DateEntry" discussion. (I just saw and installed the new release of it, v. 1.39. Thanks!) Now it is the Tk::chooseDirectory widget. It erases "-initialdir" assigned variable when "Cancel" is clicked. I think that this is a bug. "Cancel" should mean that the previous state be restored, and not affected, isn't it? I am attaching a Perl script which demonstrates it (on Win32). As invoked: After clicking "Cancel": Regards, Meir Guttman, Ashdod, Israel
On Wed Dec 23 05:37:03 2009, meir@guttman.co.il wrote: Show quoted text
> Dear Slaven, > > It's me again, from the "DateEntry" discussion. (I just saw and installed > the new release of it, v. 1.39. Thanks!) > > Now it is the Tk::chooseDirectory widget. It erases "-initialdir" assigned > variable when "Cancel" is clicked. I think that this is a bug. "Cancel" > should mean that the previous state be restored, and not affected,
isn't it? Show quoted text
> > I am attaching a Perl script which demonstrates it (on Win32). > > > > As invoked: > > > > > > > > After clicking "Cancel": >
I think it's working as intended. If the user presses Cancel, then chooseDirectory returns undef. It does not automagically preserve the -initialdir value. I think you want to use rather: sub do_pick_dir { my $new_target_dir = $pick_target_dir->chooseDirectory( -initialdir => $target_dir, -title => 'chooseDirectory bug'); $target_dir = $new_target_dir if defined $new_target_dir; } Regards, Slaven
Subject: RE: [rt.cpan.org #53002] chooseDirectory erases the "-initialDir" variable when "Cancel" is clicked
Date: Wed, 03 Feb 2010 13:25:11 +0200
To: bug-Tk [...] rt.cpan.org
From: Meir Guttman <meir [...] guttman.co.il>
Dear Slaven, Hmmm.. OK! Thanks! Meir Show quoted text
-----Original Message----- From: Slaven_Rezic via RT [mailto:bug-Tk@rt.cpan.org] Sent: Tuesday, February 02, 2010 2:15 PM To: meir@guttman.co.il Subject: [rt.cpan.org #53002] chooseDirectory erases the "-initialDir" variable when "Cancel" is clicked <URL: https://rt.cpan.org/Ticket/Display.html?id=53002 > On Wed Dec 23 05:37:03 2009, meir@guttman.co.il wrote:
> Dear Slaven, > > It's me again, from the "DateEntry" discussion. (I just saw and installed > the new release of it, v. 1.39. Thanks!) > > Now it is the Tk::chooseDirectory widget. It erases "-initialdir" assigned > variable when "Cancel" is clicked. I think that this is a bug. "Cancel" > should mean that the previous state be restored, and not affected,
isn't it?
> > I am attaching a Perl script which demonstrates it (on Win32). > > > > As invoked: > > > > > > > > After clicking "Cancel": >
I think it's working as intended. If the user presses Cancel, then chooseDirectory returns undef. It does not automagically preserve the -initialdir value. I think you want to use rather: sub do_pick_dir { my $new_target_dir = $pick_target_dir->chooseDirectory( -initialdir => $target_dir, -title => 'chooseDirectory bug'); $target_dir = $new_target_dir if defined $new_target_dir; } Regards, Slaven