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

Re: [MacPerl] does MacPerl's ReleaseResource return 1 on success or failure?



Dan Herron <herron@cogsci.ucsd.edu> writes:
>According to the MacPerl documentation, ReleaseResource returns 1 on
>failure.

If the documentation says that, it is wrong. All toolbox calls return true
on success and false on failure.

>Looking at ZoneRanger seems to indicate that MacPerl releases the resource
>in the first case, contradicting the apparent failure. It also indicates,
>however, that MacPerl creates a NEW handle every time it calls
>ReleaseResource--I know very little about the Resource Manager, but this
>seems odd to me

I think you're misinterpreting the ZoneRanger display. I'll check tonight
whether anything fishy happens, but I don't think so.

>I've looked around the archives for any other code examples using
>resources, but didn't find any--anybody have anything working I could look
>at (some code in which you are sure you are reading and releasing resources
>successfully?)

Like all toolbox modules, there is little existing code that uses
Mac::Resources. If your script has any chance of running on my machine, I'd
like to see it.

Matthias

-----
Matthias Neeracher   <neeri@iis.ee.ethz.ch>   http://www.iis.ee.ethz.ch/~neeri
   "One fine day in my odd past..." -- Pixies, _Planet of Sound_