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

Re: [MacPerl] calling xcmds/xcfns



At 16:47 Uhr +0200 17.10.2000, Stephan Tinnemeyer wrote:
>Peter,
>
>just a thought:
>
>Change the names of the commands and functions with ResEdit!
>

Thanks for your suggestion, but there is only one function in the 
xcfn and it turned out that my initial assumption was wrong: LAA is 
the function name, everything else is parameters.

I just succeeded in using the xcfn in RealBasic. (BTW, the xcfn 
accesses the OS's Japanese morpheme analysis library). A very minimal 
example without any error checking is:

dim mystring, errorString as string

errorString = LAA("open")
mystring = LAA("convert","ã¶ìØäJî‚")
errorString = LAA("close")
EditField1.text = mystring

(The garbage string is supposed to be Japanese.)

The same thing in MacPerl should look like

package LAA;
MacPerl::LoadExternals("LAA.xcmd");

LAA("Open");
$abc = LAA("convert","ã¶ìØäJî‚");
LAA("close");

print $abc . "\n";

When I try to run this, however, I get the error

# Undefined subroutine &LAA::LAA called.
File 'Macintosh HD:Desktop Folder:LAA Test'; Line 5

Any idea anybody? Any help is appreciated.
Is it possible that MacPerl can run only 68k code? This one is PPC.
I'd prefer to do this project in MacPerl, but if it isn't possible 
I'll have to take refuge to RealBasic.

Thanks,


__Peter Hartmann ________

mailto:hphartmann@justmail.de

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