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

Re: [MacPerl] MacPerl::Choose



toruk@in50205.cc.nps.navy.mil said

>I couldn't make MacPerl::Choose work. When I run something like below
>
>---------------------
>#!perl
>
>require "GUSI.ph";
>
>$dir = MacPerl::Choose(GUSI::AF_FILE, 0, "","", GUSI::CHOOSE_DIR);
>
>print $dir,"\n";
>----------------------
>
>I get
>-----------------------
># Argument "GUSI::AF_FILE" isn't numeric for subroutine entry.
>
># Argument "GUSI::CHOOSE_DIR" isn't numeric for subroutine entry.
>----------------------
>
>I am using MacPerl 5.0.6.r1m
>
>thanks
>
>tufan
>
>
>
>---
>Tufan ORUK                <toruk@nps.navy.mil>
>                          <http://dubhe.cc.nps.navy.mil/~toruk>
>Naval Postgraduate School
>Monterey, CA
>
>"Everything is possible if you don't have to do it by yourself"

This works fine for me with MacPerl 5.07r1m
---------------------------------------

#!perl

require "GUSI.ph";

$dir = MacPerl::Choose(&GUSI::AF_FILE, 0, "","", &GUSI::CHOOSE_DIR);

#                      ^                         ^
# notice ampersands prior to GUSI strings
#

print $dir,"\n";

-----------------------------------------

However, I didn't get any warning messages when I ran your code, as supplied. I
just got no useful output.

Bob

________________________________________________________________
          Bob Wilkinson, Perl Programmer, Pindar plc
Tel: +44 (0)1904 613040    Email: B.Wilkinson@pindar.co.uk
Fax: +44 (0)1904 613110    URL: http://www.connection.co.uk/bob
________________________________________________________________
    The views expressed herein are mine, and are not 
          necessarily shared by my employer.
________________________________________________________________