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

Re: [MacPerl] minor debugging



---so spake Chris Nador---
So apparently when SetFileInfo() gets undef, it uses %ld, for some odd reason.
------------

yes. in the larger version of the program before I modified it to say 'cancelled' when it was canceled (or null input) it would set to %ld. Not sure why exactly but it does, I was wondering more about why it does it with "alt" charecters.

---spake he---
>$orig = join "/", reverse MacPerl::GetFileInfo($file);
>$_ = MacPerl::Ask($orig.'     =>     TYPE/CREA ?');
>if ($_ =~ /^\/....$/) {
>     $type = $orig;
>     $type =~ s/\/....//;
>     $creator = $_[0];

What is this?  $_[0] is undef.  It was never given a value.  Same thing below:

>     $type = $_[0];
>     $type =~ s/\/....$//;
>     $creator = $_[0];
------------

It's set by the MacPerl::Ask perhaps should it be...
>$_[0] = MacPerl::Ask($orig.'     =>     TYPE/CREA ?');
as it stands it works for most cases of input (perhaps it just silently fails?). I've only had problems when using "alt" charecters (or "opt" charecters)

le meas,
--Nick

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