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

Re: [MacPerl] order of args in @ARGV?



At 20:48 -0800 11/2/98, Peter Hartmann wrote:
> At 21:54 Uhr -0500 02.11.1998, Paul J. Schinder wrote:
> >At 5:38 PM -0800 11/2/98, Vicki Brown wrote:
> >} But MacOS has no command line.  I would have expected files dropped
>onto a
> >} MacPerl droplet to go into @ARGV in alphabetical sort order.  But they
> >} don't... they appear to go into @ARGV in the order in which they were
>named
> >} (or, in which their names were changed).  Is this access time?
> >
> >No, I believe that usually it's however they're ordered in the Finder (by
> >name, by date, etc.).  There is a way to get them in @ARGV in the way
>that
> >they're selected, but I've forgotten the exact procedure (maybe it's that
> >way if they're selected in full iconic view, but I'd have to test to make
> >sure.)
>
> I (also) have to disagree.
> I guess there maybe some Finder update
> problem behind. Switching to list view in name order etc. does not change
> anything. I made this experience on other occasions, too, so I generally
> sort everything if order is crucial.

I perhaps should have mentioned that I played games with renaming the files
and yet selecting them in the same way (grabbing with the cursor marquee,
from the upper left to the lower right). and the renaming had off effects.
I should also mention that I invariably use List View and thus my tests
were done in List View. In these tests, I always used View By Name.

My script (as a droplet) is essentially the same as Peter's:

foreach $arg (@ARGV) {
    print $arg, "\n";
}


When I had files named
    -a
    -b
    -c

and dropped those I got:
/system:Desktop Folder:untitled folder:-a
/system:Desktop Folder:untitled folder:-b
/system:Desktop Folder:untitled folder:-c

When I rename "-a" to "-aa" (which still sorts at the top of the list, I get
/system:Desktop Folder:untitled folder:-b
/system:Desktop Folder:untitled folder:-c
/system:Desktop Folder:untitled folder:-aa

Thus, how the files are ordered by the Finder is, apparently, irrelevant.

> I generally sort everything if order is crucial.

Emphatically.  But again I ask... _why_?

Just now I switched briefly to View by Modified Date, (no change), changed
"-b" to "-bb"
/system:Desktop Folder:untitled folder:-c
/system:Desktop Folder:untitled folder:-aa
/system:Desktop Folder:untitled folder:-bb

then back to View by Name (no change in order from above).  So, now -c is
first.

Answers?

- Vicki
---
Vicki Brown <vlb@cfcl.com>           |\      _,,,---,,_
Journeyman Sourceror           ZZZzz /,`.-'`'    -.  ;-;;,_
Scripts & Philtres                  |,4-  ) )-,_. ,\ (  `'-'
P.O. Box 1269, San Bruno CA 94066  '---''(_/--'  `-'\_)
http://www.cfcl.com/~vlb      http://www.ptf.com/macperl

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