hi preston (and others),

it's a side-effect of the compiler-advancement in Axapta 3.0!

the finalize() method of system class "Io" and all derivated classes is declared as an protected method (also in Axapta 2.5).

since Axapta 3.0 the compiler now consider the "scope" of an method, which will be defined in the method-header by using the so called method-modifier:
- private
- public
- protected
- final
- abstract


so, when compiling object-code like

    Io io = new Io("myFile", "W");
    ;
    io.finalize();

Axapta 2.5 will not send a compiler-error, but Axapta 3.0 will!

regards
wolfgang



--- In [EMAIL PROTECTED], "Preston A. Larimer" <[EMAIL PROTECTED]> wrote:
Maarten & Wolfgang, Thanks for the heads up on finalize being protected in 3.0, I
hadn't
realized that. It would have slapped me in the face when the time
comes
to upgrade one client where I reuse the same IO object for multiple
files in a single method. Does anyone know if this was an
intentional
feature or just a side affect of some other change?
-Preston
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 10, 2003 1:58 AM
To: [EMAIL PROTECTED]
Subject: RE: [development-axapta] Closing files after usage
In 3.0 this method cannot be used because the method is protected.
if
you declare your asciiio object as an object, you are able to use the
finalize method.
ex.
object export = new asciiio(filename,'W');


Regards
Maarten

Aanhalen "Preston A. Larimer" <[EMAIL PROTECTED]>:

> Use the finalize method of asciiIO …. Export.finalize(); > Finalize is called automatically when the scope of the IO file is
> destroyed,.
> > -----Original Message-----
> From: Mikael Dalgård [mailto:[EMAIL PROTECTED] > Sent: Tuesday, September 09, 2003 1:27 AM
> To: [EMAIL PROTECTED]
> Subject: [development-axapta] Closing files after usage
> > Hi everybody
> > Can anybody tell me, how I can close a file after written data to
it,
> like in this little example down below?
> > FilenameSave filename
= "d:\\temp\\comma.csv";
> AsciIIO export = new
> AsciIIO(filename,"W");
> ;
> > while select * from CUT
> order by AccountNum, Name
> > {
> export.write(CUT.AccountNum + '@' + CUT.Name);
> }
> > Best regards
> > Mikael Dalgård
> > > Your use of Yahoo! Groups is subject to the Yahoo! Terms of
Service
> <http://docs.yahoo.com/info/terms/> . >



Met vriendelijke groet, Kind regards, Med venlig hilsen,

Maarten van de Wijgerd
Software Engineer
[EMAIL PROTECTED]

Columbus IT Partner
Lange Dreef 8
4131 NH Vianen (UT)
Tel.: +31 (0)347 37 38 43
Fax : +31 (0)347 37 37 44
www.columbus.nl




Yahoo! Groups Sponsor



ADVERTISEMENT


<http://rd.yahoo.com/M=251812.3856299.5103760.1261774/D=egroupweb/S=17
05

006764:HM/A=1754451/R=0/SIG=11tkldm5d/*http:/www.netflix.com/Default?
mqs
o=60178323&partid=3856299> click here

<http://us.adserver.yahoo.com/l?
M=251812.3856299.5103760.1261774/D=egrou
pmail/S=:HM/A=1754451/rand=949054012>

Your use of Yahoo! Groups is subject to the Yahoo! Terms of
<http://docs.yahoo.com/info/terms/>  Service.



Yahoo! Groups Sponsor


Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.

Reply via email to