[ macperl-Bugs-525983 ] crash with Copy or Cut, TE?
[email protected] Tue, 05 Mar 2002 07:24:39 -0800
| Newsgroups | perl.macperl.porters |
|---|---|
| Message-ID | <[email protected]> |
Bugs item #525983, was opened at 2002-03-05 15:24
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=107940&aid=525983&group_id=7940
Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Axel Rose (axelrose)
Assigned to: Nobody/Anonymous (nobody)
Summary: crash with Copy or Cut, TE?
Initial Comment:
I experience a Bus Error after just pressing Cmd-C and
a PowerPC access exception using Cmd-X while running
the following sample program
(taken from a post to the mailing list by Alan Fry - I
do not fully understand the internals and found this just
by playing with MacPerl)
#!perl -w
use strict;
use Mac::Events;
use Mac::QuickDraw;
use Mac::TextEdit;
use Mac::Windows;
my $win =
MacWindow->new( Rect->new( 50, 50, 550, 290 ), "Text Console", 1,
floatProc, 1 );
SetPort $win->window;
$win->sethook( 'redraw', \&do_draw );
my $viewRect = $win->window->portRect;
my $destRect = OffsetRect( $viewRect, 10, 10 );
my $hTE = TENew( $destRect, $viewRect );
TESetText( "sample text", $hTE );
WaitNextEvent while $win->window;
dispose $win;
TEDispose($hTE);
sub do_draw {
my ($win) = @_;
TEActivate($hTE);
TEGetText($hTE);
TEUpdate( $viewRect, $hTE );
}
----------------------------------------------------------------------
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=107940&aid=525983&group_id=7940