Menu

#121 crash with Copy or Cut, TE?

open
nobody
2
2002-03-06
2002-03-05
Axel Rose
No

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 );
}

Discussion

  • Chris Nandor

    Chris Nandor - 2002-03-05
    • labels: --> Mac Toolbox (Mac:: modules)
    • priority: 5 --> 4
     
  • Chris Nandor

    Chris Nandor - 2002-03-05

    Logged In: YES
    user_id=3660

    This is apparently a bug in 5.2.0r4 as well. I am not
    inclined to fix it now, but will try to get to it when I find
    some tuits. Thanks.

     
  • Chris Nandor

    Chris Nandor - 2002-03-06
    • priority: 4 --> 2
     
  • Chris Nandor

    Chris Nandor - 2002-03-06

    Logged In: YES
    user_id=3660

    This should be handled, I think, more nicely by MacPerl.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.