Skip Menu |

This queue is for tickets about the Tk-TOTD CPAN distribution.

Report information
The Basics
Id: 90045
Status: resolved
Priority: 0/
Queue: Tk-TOTD

People
Owner: kirsle [...] cpan.org
Requestors: Daniel.Richards [...] onsemi.com
Cc:
AdminCc:

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



Subject: I think I found another bug.
Date: Mon, 4 Nov 2013 19:21:59 +0000
To: "bug-Tk-TOTD [...] rt.cpan.org" <bug-Tk-TOTD [...] rt.cpan.org>
From: Daniel Richards <Daniel.Richards [...] onsemi.com>
This may be related to the other bug I found last week. Using the code below (I think I used the same code last time), when you exit the main window (using the x box), control isn't returned to the shell. In this way, it seems to act like the last bug I found. I am using the version that was put out last week. I had to install it manually, as my CPAN mirror apparently doesn't have the new code up yet didn't have the new version up last week. I just reloaded my index and now I'm good. The rest of the environment is the same as last time. Daniel Richards Intern ON Semiconductor Corp R&D Integration Email: daniel.richards@onsemi.com Work: 208-233-4690 x6316
This seems to be a problem in Tk::DialogBox, which Tk::TOTD uses on the back-end. I think the root problem is, again, that Tk::DialogBox uses waitVariable to determine when to close the dialog window, so when the dialog is open and you close the MainWindow behind its back, the variable it's waiting on is never updated, so the program doesn't exit. You might try opening a bug report for Tk::DialogBox to fix this underlying problem. In the meantime, I've just uploaded a new version of Tk::TOTD to CPAN (v0.4) which allows for a workaround to this bug: I added a destroy() method which cleans up the DialogBox, and you can call this from a WM_DELETE_WINDOW protocol handler on your MainWindow. $mw->protocol('WM_DELETE_WINDOW', sub { $totd->destroy(); exit(0); }); https://github.com/kirsle/Tk-TOTD/commit/2bed26c7a0f33182c0c2ad0953ccee2111e6445b#diff-02b972ee2fbb60cc946879be5a52b302R296
Subject: RE: [rt.cpan.org #90045] Resolved: I think I found another bug.
Date: Tue, 12 Nov 2013 15:56:54 +0000
To: "bug-Tk-TOTD [...] rt.cpan.org" <bug-Tk-TOTD [...] rt.cpan.org>
From: Daniel Richards <Daniel.Richards [...] onsemi.com>
Thank you for your response. Unfortunately, the problem seems to persist. When I close the main window with the x button, the program acts the same way as before. However, when I close the TOTD box then the main window, I get something like this: wm (4): 0 0x12e4e840 PVMG f=00040807 {}(2)(1) SV = PVMG(0x131cb7e0) at 0x12e4e840 REFCNT = 1 FLAGS = (PADMY,ROK) IV = 0 NV = 0 RV = 0x131235c8 SV = PVHV(0x131d5350) at 0x131235c8 REFCNT = 2 FLAGS = (OBJECT,SHAREKEYS) STASH = 0x13069da0 "MainWindow" ARRAY = 0x1331b5d0 (0:7, 1:1) hash quality = 100.0% KEYS = 1 FILL = 1 MAX = 7 RITER = -1 EITER = 0x0 Elt "_TkValue_" HASH = 0xf8f586ad SV = PV(0x132e9320) at 0x13122bc0 REFCNT = 1 FLAGS = (POK,pPOK) PV = 0x132e5b40 "."\0 CUR = 1 LEN = 16 PV = 0x131235c8 "" CUR = 0 LEN = 0 1 0x13135ac0 PV f=20004404 protocol(1) SV = PV(0x13101630) at 0x13135ac0 REFCNT = 1 FLAGS = (POK,pPOK,UTF8) PV = 0x1312ca70 "protocol"\0 [UTF8 "protocol"] CUR = 8 LEN = 16 2 0x13026840 PV f=08004404 WM_DELETE_WINDOW(1) SV = PV(0x12e2e2d0) at 0x13026840 REFCNT = 1 FLAGS = (POK,READONLY,pPOK) PV = 0x132ef270 "WM_DELETE_WINDOW"\0 CUR = 16 LEN = 24 3 0x1334c660 NV f=00000802 \&main::__ANON__(2)(1) SV = IV(0x1334c650) at 0x1334c660 REFCNT = 1 FLAGS = (ROK) RV = 0x13327478 SV = PVCV(0x132bdd60) at 0x13327478 REFCNT = 2 FLAGS = (ANON,CLONED,CVGV_RC) COMP_STASH = 0x12e2fc50 "main" START = 0x12f368e0 ===> 1 ROOT = 0x131cd0e0 GVGV::GV = 0x132f0088 "main" :: "__ANON__" FILE = "./dialog_test.pl" DEPTH = 0 FLAGS = 0x4c0 OUTSIDE_SEQ = 3683 PADLIST = 0x1333d0d0 PADNAME = 0x13357990(0x133887b0) PAD = 0x13357ac8(0x1335a010) 1. 0x12e4e8d0<2> FAKE "$dialog" flags=0x0 index=3 OUTSIDE = 0x12e2ffc8 (MAIN) SV = PVCV(0x12e3ebd0) at 0x12e2ffc8 REFCNT = 2 FLAGS = (UNIQUE) COMP_STASH = 0x0 ROOT = 0x0 GVGV::GV = 0x0 FILE = "(null)" DEPTH = 1 FLAGS = 0x100 OUTSIDE_SEQ = 0 PADLIST = 0x12e2ffe0 PADNAME = 0x12e2fff8(0x131cd1c0) PAD = 0x12e30010(0x131c91e0) 1. 0x12e4e840<1> (3681,3684) "$mw" 3. 0x12e4e8d0<2> (3682,3684) "$dialog" 7. 0x13017c38<1> (0,0) "&" OUTSIDE = 0x0 (null) Usage $widget->wm(...) at /home/perl_5_16_0_64/lib/site_perl/5.16.0/x86_64-linux/Tk/Submethods.pm line 37. The code I am using to replicate this behavior is: #!/usr/bin/env perl use Tk; use strict; use warnings; use Tk::TOTD; my $mw = MainWindow->new; my $totd = $mw->TOTD(); $totd->Show; MainLoop; $mw->protocol('WM_DELETE_WINDOW', sub { $totd->destroy(); exit(0); }); Daniel Richards Intern ON Semiconductor Corp R&D Integration Email: daniel.richards@onsemi.com Work: 208-233-4690 x6316 Show quoted text
-----Original Message----- From: Casey Kirsle via RT [mailto:bug-Tk-TOTD@rt.cpan.org] Sent: Monday, November 11, 2013 1:23 PM To: Daniel Richards Subject: [rt.cpan.org #90045] Resolved: I think I found another bug. <URL: https://rt.cpan.org/Ticket/Display.html?id=90045 > According to our records, your request has been resolved. If you have any further questions or concerns, please respond to this message.
Subject: RE: [rt.cpan.org #90045] Resolved: I think I found another bug.
Date: Tue, 12 Nov 2013 15:57:49 +0000
To: "bug-Tk-TOTD [...] rt.cpan.org" <bug-Tk-TOTD [...] rt.cpan.org>
From: Daniel Richards <Daniel.Richards [...] onsemi.com>
I did file a bug report for the Tk::Dialog, but I haven't heard back yet. Daniel Richards Intern ON Semiconductor Corp R&D Integration Email: daniel.richards@onsemi.com Work: 208-233-4690 x6316 Show quoted text
-----Original Message----- From: Casey Kirsle via RT [mailto:bug-Tk-TOTD@rt.cpan.org] Sent: Monday, November 11, 2013 1:23 PM To: Daniel Richards Subject: [rt.cpan.org #90045] Resolved: I think I found another bug. <URL: https://rt.cpan.org/Ticket/Display.html?id=90045 > According to our records, your request has been resolved. If you have any further questions or concerns, please respond to this message.