Path: utzoo!censor!geac!torsqnt!news-server.csri.toronto.edu!cs.utexas.edu!usc!snorkelwacker.mit.edu!apple!portal!sv!daven From: daven@svc.portal.com Newsgroups: comp.sys.mac.programmer Subject: Re: Methods overriding global functions Keywords: object pascal Message-ID: <1990Dec31.043319.26383@svc.portal.com> Date: 31 Dec 90 04:33:19 GMT References: <1990Dec30.044453.29640@ux1.cso.uiuc.edu> Organization: Software Ventures Lines: 20 In article <1990Dec30.044453.29640@ux1.cso.uiuc.edu> ml27192@uxa.cso.uiuc.edu (lanett mark) writes: >I'm writing a program using MacApp that for various reasons uses the generic >pascal i/o routines like open/close. When I try to call close from a method >of a TDocument class the compiler flags an error. The problem is that TDoc >_already_ has a method called close, with no arguments, and the compiler is >trying to use that one instead of the generic close. I am not using Self, >either. I can't think of any "slight of hand" that will make the Pascal compilier do what you want without forcing something to change it's name. Using a global routine that calls Close would be the easiest thing to do. I serious believe the MacApp team assumed that most people would be calling the Mac's FSClose routine instead of the Pacal I/O Close routine. -- ------------------------------------------------------------------------------- Dave Newman | daven@svc.portal.com | AppleLink: D0025 Sofware Ventures Corp. | AOL: MicroPhone | CIS: 76004,2161 Berkeley, CA 94705 | WELL: tinman@well.sf.ca.us | (415) 644-3232