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

Re: [MacPerl] Glue::Stuck::Help



At 2:35 PM -0400 9/24/98, Chris Nandor wrote:
>At 14.07 -0400 1998.09.24, Josh Gemmell wrote:
>>$db1 = $fm->ae_object( document => $database );
>>$fm->open( $db1 );
>
>>At any rate, this doesn't work. It starts up FileMaker OK, but then does
>>nothing. I'm obviously missing something important here, but I have no
>>idea what. Your example worked on volume folders in the finder, not
>>programs opening documents.
>
>Well, for starters, if you had -w on, you would have gotten a couple of
>errors from StandardFile.pl, but more importantly, you would have gotten:
>
>  # Application error -1700: Unable to coerce the data to the desired type.
>  File 'Bird:Pudge:pudgeprogs:perl:site_specific:Mac:Glue.pm'; Line 76
>
>Basically, I cannot figure out how FM is supposed to take an object.  If
>you run the same script from AppleScript, you get the same error:
>
>  tell application "FileMaker Pro"
>    open document "HD:myfile"
>  end tell
>
>So the fault is not with the glue, but with figuring out the right syntax
>to use in AppleScript, and applying that to the MacPerl script.  Heck,
>maybe FM Pro is broken here.
>
>What I did was simplify matters: if you run this in AppleScript, it works:
>
>  tell application "FileMaker Pro"
>    open "HD:myfile"
>  end tell
>

>From an AppleScript persepective - what Chris has above is the functional
method of opening a document in FileMaker.

There are a couple of caveats - and not having looked at
Mac::Glue::FileMaker_Pro I don't know if these are addressed.

One:  There are actually TWO separate open commands in the dictionary.  One
that is the required suite open, which accepts a list of aliases.  The
other is in the so delightfully named "Subset of the Core, Table, and
Database Suites" suite.  This one accepts a reference (defined as 'the
object to open').  It also has an optional "with password" clause, which
takes a string (the clear-text password - security? never heard of it).

Second - there is a good deal of weirdness about FileMaker's various
methods of opening files.  One of the is that the open command (I don't
know which one) will actually search the local zone for a filemaker server,
and see if there is a document of the given name on the fmpro server, and I
can only guess that it would open a local doc over the host doc in case of
name collision.  Second - the with password clause only works vaguely for
documents on hosts - the only 100% functional way to open a document with a
password off a server is to open a local document that executes a
ScriptMakerŞ script to open the document you want to open.  Third - there
is a separate applescript command - getURL - for opening documents from
filemaker servers - which in no manner allows you to use or send a
password.

See how much fun you miss by using Perl?

-Jeff Lowrey
perl newbie, mac guru



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