Problem: 1615685

Title: (CAEDesc -ReadFrom) Variable "dataHandle" hides member variable

Received: Dec 27 1996 2:25PM


There is a stupid Bug in CAEDesc::ReadFrom as found in MacApp R11
void CAEDesc::ReadFrom(TFile* aFile, ResType resourceType, short resourceID)
{
        ...
        CTempUseResFile tempUseResFile(aFile->fRsrcRefNum);
        Handle dataHandle = Get1Resource(resourceType, resourceID);
        if (dataHandle)
        {
                descriptorType = resourceType;
                DetachResource(dataHandle);
                dataHandle = dataHandle;        // Bug, should be
this->dataHandle = dataHandle
        }
        ...
}
Could some Compiler vendor (Hello MWRon ...) implent a warning ala Warning variable "Handle dataHandle" hides membervariable "Handle dataHandle" ?
Fix:

UAppleEvents.cp: Changed the local from 'dataHandle' to 'descHandle' to avoid any confusion at all.