www.delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2010/12/16/14:08:08

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=1.0 required=5.0 tests=AWL,BAYES_20,RCVD_IN_DNSWL_NONE,SPF_HELO_PASS
X-Spam-Check-By: sourceware.org
Date: Thu, 16 Dec 2010 20:07:51 +0100
To: cygwin AT cygwin DOT com
Subject: Problem with Perl/Tk and Pixmap
Message-ID: <20101216190751.GA3017@ford.loewis.de>
Reply-To: johannes AT v DOT loewis DOT de
MIME-Version: 1.0
User-Agent: Mutt/1.5.20 (2009-06-14)
From: =?UTF-8?Q?Johannes_v=2E_L=C3=B6wis?= <johannes AT v DOT loewis DOT de>
X-Df-Sender: johannes AT v DOT loewis DOT de
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

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:

$ ./logotest.pl 
Can't bless non-reference value at /usr/lib/perl5/vendor_perl/5.10/i686-cygwin/Tk/Image.pm line 23.

$ cat logotest.pl 
#!/usr/bin/perl
use strict;
use warnings;
use Tk;

my $mw = new MainWindow;
my $icon = '/* XPM */
static char *Camel[] = {
/* width height num_colors chars_per_pixel */
"    32    32        2            1",
/* colors */
". c #ffffff",
"# c #7f7f00",
/* pixels */
"................................",
"................................",
"...................###..........",
".......####......######.........",
"....####.##.....########........",
"....########....#########.......",
"......######..###########.......",
"......#####..#############......",
".....######.##############......",
".....######.###############.....",
".....######################.....",
".....#######################....",
".....#######################....",
"......#######################...",
".......####################.#...",
"........###################.#...",
"........###############.###.#...",
"............#######.###.###.#...",
"............###.###.##...##.....",
"............###.###..#...##.....",
"............##.####..#....#.....",
"............##.###...#....#.....",
"............##.##...#.....#.....",
"............#...#...#.....#.....",
"............#....#..#.....#.....",
"............#.....#.#.....#.....",
"............#.....###.....#.....",
"...........##....##.#....#......",
"...........#..............#.....",
".........###.............#......"
"................................",
"................................",
};';

$mw->Pixmap('logo', -data=>$icon);
$mw->iconimage('logo');
MainLoop;

$ uname -a
CYGWIN_NT-5.1 user-e90cadfdc0 1.7.7(0.230/5/3) 2010-08-31 09:58 i686 Cygwin


Any ideas or suggestions what further information I could provide
in order to sort this out?

Regards
Johannes



--
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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019