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

Re: [MacPerl] MacPerl::SetFileInfo Help (fwd)



mark@cheers.jsc.nasa.gov (Mark Manning/Muniz Eng.) writes:
>According to Chris Nandor:
>> 
>> >$x = &StandardFile'GetNewFile("Select New File", "foo");
>> >open (MYFILE,">$x")|| die "could not open $x";
>> 
>> >MacPerl::SetFileInfo ("R*ch" , "TEXT" , MYFILE);
>>                                          ^^^^^^
>> I think the third arg should be a path to a file (i.e., $x), not a
>>filehandle.

Right.

>Don't you also have to close the file first?

I don't think so.

>The file isn't even officially created until after it's been closed.

Hmm? Where did you get that idea? The Finder is slow to update sometimes,
but the file is certainly created at open() time.

>So wouldn't SetFileInfo always bomb or at least
>have problems if the file hasn't really been created yet?

Not bomb, but, yes, it wouldn't work on an inexistent file.

Matthias

-----
Matthias Neeracher   <neeri@iis.ee.ethz.ch>   http://www.iis.ee.ethz.ch/~neeri
   "I'm set free to find a new illusion" -- Velvet Underground

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