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

Re: [MacPerl] GUSI, etc.



At 18.41 97/3/20, Bill Melvin wrote:
>3 ) Why can't I build a $list=" 'Option 1' , 'Option 2' "; to pass to
>MacPerl::Ask('Select from this list',$list)?
>I've tried putting a \ before the single-quotes, etc. and the result is
>still just one option that looks like 'Option 1', 'Option 2'.

MacPerl::Ask gives you only one option.  I think you want MacPerl::Pick.
And you need to pass an array, not a scalar, and not a reference to an
array, but a real array.

$list = " 'Option 1' , 'Option 2' ";  #scalar
$list = ['Option 1' , 'Option 2'];  #reference to an array
@list = ('Option 1' , 'Option 2'); #array
$list = \@list;  #also a reference to an array

MacPerl::Pick('Select from this list',@list);

#================================================================
Chris Nandor                                      pudge@pobox.com
PGP Key 1024/B76E72AD                           http://pudge.net/
Keyfingerprint = 08 24 09 0B CE 73 CA 10  1F F7 7F 13 81 80 B6 B6