[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

[MacPerl] Mac::Navigation::NavPutFile



Could somebody tell me why this code produces an error?

#!perl -w

use Mac::Navigation;
use Carp;

  my $opts = NavGetDefaultDialogOptions();
  $opts->message('ghfd');
  $opts->clientName(($0 =~ /:([^:]+)$/)[0]);  
  $opts->savedFileName('rgdgh');

  my $types = new NavTypeListHandle _ThisAppCreat(), [TEXT];

 my $ftype = 'xxxx';
  my $fcreat = 'xxxx';

  my $reply = NavPutFile(
    "",
    $opts,
    $ftype, $fcreat,
    sub {1},
  );

  if (!$reply) {
    croak "Navigation Services error: $^E";
  }

  my @res = ();
  for (my $i = 0; $i++ < $reply->count;) {
    push @res, $reply->file($i);
  }

  print "@res\n";

sub _ThisAppCreat () {
  use Mac::Processes;

  my $s = GetCurrentProcess;
  return $Process{$s}->processSignature;
}

__END__

The error is:

# Navigation Services error: OS error -5699 (Error message text not
available)

-- 
  Kevin Reid.      |         Macintosh.
   "I'm me."       |      Think different.

***** Want to unsubscribe from this list?
***** Send mail with body "unsubscribe" to mac-perl-request@iis.ee.ethz.ch