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

[MacPerl-Modules] can't locate object method "prop"



I'm having some trouble with a glue script.  I'm trying to write a little
widget to run out n copies of a CD, using glue and Adaptec's toast.

Here's the script

use strict;
use Mac::Glue ':all';
use Data::Dumper;

my $toaster = Mac::Glue->new('Toast_3_5_6');

my $copies = MacPerl::Ask('How many copies do you want to make','2');

$toaster->activate();
my $currentDisc = $toaster->get($toaster->obj(property => 'current_disc'));

#The following attempts to set a couple of useful properties
#These properties are only valid for certain types of discs, however.
#Thus the evals.  I don't care if they fail.
#my $bootable = $toaster->prop('bootable', of => $currentDisc) or warn;
eval { $toaster->set($currentDisc->prop('bootable') , gTrue); } or warn;
eval { $toaster->set($currentDisc->prop('dont_copy_free_space'), gTrue); }
or warn;

# for (my $count=1;$count<= $copies;$count++)	{
# 	$toaster->write($currentDisc, eject => gTrue, verify => gFalse);
# };

__END__

And here's the error messages I'm getting:
# Can't locate object method "prop" via package "AEObjDesc".
File 'Jeff-HD:*Jeff:MacPerl Ÿ:scripts:repeating toaster.pl'; Line 16
	...caught.
File 'Jeff-HD:*Jeff:MacPerl Ÿ:scripts:repeating toaster.pl'; Line 16
# Can't locate object method "prop" via package "AEObjDesc".
File 'Jeff-HD:*Jeff:MacPerl Ÿ:scripts:repeating toaster.pl'; Line 17
	...caught.
File 'Jeff-HD:*Jeff:MacPerl Ÿ:scripts:repeating toaster.pl'; Line 17

I've tried several different variations on the $currentDisc->prop()
statements, and keep ending up with the same problems.  I've tried a couple
of other things as well, and am not getting anywhere.

Please note that I've only got the for loop commented out because I don't
want to write a cd everytime I'm trying to test the script.  Also note
that, yes, I do have a valid disc image loaded into toast ready to write
and YES it is a disc that will allow both bootable & dont_copy_free_space.
But, that shouldn't matter - that's why I have the eval.

When I do have the write statment uncommented, it complains about eject:
# 'eject' parameter not available
File 'Dev:Pseudo'; Line 20

-Jeff Lowrey



==== Want to unsubscribe from this list?
==== Send mail with body "unsubscribe" to macperl-modules-request@macperl.org