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

[MacPerl] Problem with Valentina 1.8 PPC MacPerl glue code



Hello,

I have been trying to run the following script using Valentina 1.8
(www.paradigmasoft.com) gluecode generated by cpan-mac, without success:

#!perl
use Mac::Glue;

# Create a filespec with the Finder Glue
# A filespec is a unique encoding for each file (PR)
my $g = new Mac::Glue 'Finder';
my $f = $g->obj(file => 'RochPort:Desktop Folder:Customers
Folder:Customers');

# Switch to Valentina and create a database
my $n = new Mac::Glue 'Valentina__PPC';
$n->activate;
$theDB = $n->make(new => 'database', with_data => $f);
die $^E if $^E;

#$n->open($theDB);
#die $^E if $^E;

$n->make(new => 'base_object', with_properties => {name => 'Customer'},
at => {current_record => 'end', database => $theDB });
die $^E if $^E;

$n->make(new => 'field', with_properties => {name => 'Name',type =>
'tString','length' => 50}, at => {current_record => 'end',base_object =>
'Customer'});
die $^E if $^E;
$n->close($theDB);

================

An error is generated while making a 'base object', that is, a table (in
the sql sense of the word)

========


# OS error -1708 (Error message file not available).
File 'RochPort:MacPerl 5.20 ƒ:Dossier scripts MacPerl:Dossier
Valentina:testvalen.pl'; Line 19


============

When you capture AppleEvents using CaptureAE while running the above
MacPerl script, you get the following:

Process("MacPerl").SendAE "misc,dosc,'----':fss
(«FFFF0000748A0C7465737476616C656E2E706CC468FFF7400AB8E3804831B00C003171F00BA340C800139F7A0031D2C40AB8E3F808E257700AB8E3C00013A5B21BE15F900000»),

DIRE:fss
(«FFFF00000A8411446F73736965722056616C656E74696E610AB8E8C022000048003608ECAB2408ECAB2408EC00036A38642E006170706C6963610BA3B3040AB8EF502061626F»)"

Process("Valentina (PPC)").SendAE "misc,actv"

Process("Valentina (PPC)").SendAE "core,crel,kocl:type(VLdb), data:obj
{form:name, want:type(file), seld:“RochPort:Desktop Folder:Customers
Folder:Customers”, from:'null'()}"

Process("Valentina (PPC)").SendAE "core,crel,prdt:{pnam:“Customer”},
kocl:type(VLbo), insh:{kpos:“end”, VLdb:“Customers”}"

Process("MacPerl").SendAE "McPL,odoc,'----':[fss
(«FFFF0000748A0C7465737476616C656E2E706CEC68FFF7400AB8E5450AB8E6B4003171F008E819E40AB8E5100031AFCC0013639808E81740667373200020461E000331320000»)]"

Process("MacPerl").SendAE "misc,mvis,'----':obj {want:type(clin),
form:indx, seld:19, from:obj {want:type(cwin), form:indx, seld:1,
from:'null'()}}"
=====================

which is not the same as

Process("Valentina (PPC)").SendAE "core,crel,kocl:type(VLdb), data:obj
{form:name, want:type(file), seld:“RochPort:Desktop Folder:Customers
Folder:Customers db”, from:'null'()}, &subj:'null'()"

Process("Valentina (PPC)").SendAE "core,crel,kocl:type(VLbo),
prdt:{pnam:“Customer”}, insh:insl{kobj:obj {form:name, want:type(VLdb),
seld:“Customers db”, from:'null'()}, kpos:end }, &subj:'null'()"
=========================

...which are the AppleEvents you get when running the following
AppleScript
(which is similar to the above Perl code):

====================

tell application "Valentina (PPC)"
 set DB to make new database with data file "RochPort:Desktop
Folder:Customers Folder:Customers db"
 set Customer to make new base object with properties {name:"Customer"}
at end of DB
end tell
==========================


Any help of this matter would be much appreciated.

Philippe de Rochambeau


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