X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-0.4 required=5.0 tests=AWL,BAYES_50,TW_YG,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Content-Class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Subject: ATTN: Perl maintainer - RE: Problem with Perl/Tk and Pixmap Date: Wed, 22 Dec 2010 12:55:59 -0600 Message-ID: <786EBDA1AC46254B813E200779E7AD360149EE47@srv1163ex1.flightsafety.com> References: <20101216190751 DOT GA3017 AT ford DOT loewis DOT de> From: "Thrall, Bryan" To: X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Thrall, Bryan wrote on 2010-12-16:=20 > Andrew DeFaria wrote on 2010-12-16: >> On 12/16/2010 02:07 PM, Johannes v. L=F6wis wrote: >>> I have a Perl/Tk script that is supposed to show a pixmap on the left >>> side of the title bar of the main window. It works on Linux and on a >>> rather old version of Cygwin 1.5. On Cygwin 1.7 (on XP Home and Prof) >>> the following happens: >>>=20 >>> $ ./logotest.pl Can't bless non-reference value at >>> /usr/lib/perl5/vendor_perl/5.10/i686-cygwin/Tk/Image.pm line 23. ... >>> Any ideas or suggestions what further information I could provide in >>> order to sort this out? >>>=20 >> Reproduced. Note you problem appears to be with Tk::Image, not with >> Cygwin, though you are right in that it works on Linux and complains >> and dies on Cygwin. >>=20 >> Interestingly, if you run your program and the Perl debugger (i.e. perl >> -d logtest.pl) then simply type c for continue it works fine. >>=20 >> Looking at Image.pm I see that if I break at Image.pm:23 there's a >> "return bless $obj,$package" statement. In the debugger, $obj is >> defined and there's no problem. If, however, I just run this without >> the debugger, but put some print statements in Image.pm, I see that >> $obj is indeed returned from $widget->Tk::image as undefined. >>=20 >> This appears to be a Perl/Tk bug. >>=20 >> Even stranger! Change your >>=20 >> $mw->Pixmap('logo', -data=3D>$icon); >> to >>=20 >> my $foo $mw->Pixmap('logo', -data=3D>$icon); >> and it works! So you have a work around, and a bug to report. >=20 > I also can reproduce the problem. >=20 > This behavior reminds me of a perl-Tk packaging bug from last year: >=20 > http://www.cygwin.com/ml/cygwin/2009-07/msg00890.html >=20 > In fact, /usr/bin/widget seems to be broken again, unless you run it in > the perl debugger: >=20 > thrall AT pc1163-8413-xp ~ > $ /usr/bin/widget > Can't set -labelFont to `Courier 12 bold' for > Tk::LabEntry=3DHASH(0x1067dac0): unknown option "-labelFont" at > /usr/lib/perl5/vendor_perl/5.10/i686-cygwin/Tk/Derived.pm line 294. >=20 > at /usr/lib/perl5/vendor_perl/5.10/i686-cygwin/Tk/Derived.pm line 306 > thrall AT pc1163-8413-xp ~ > $ cygcheck -cd perl perl-Tk > Cygwin Package Information > Package Version > cygwin 1.7.7-1 > perl 5.10.1-4 > perl-Tk 804.029-1 > It seems I have unfairly blamed Perl-Tk for these problems; reverting to pe= rl-5.10.1-3 fixes both the OP's Pixmap problem and the widget problem on my= machine. Hope this helps, -- Bryan Thrall FlightSafety International bryan DOT thrall AT flightsafety DOT com =A0=20 -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple