NetTalk Central
NetTalk Web Server => Web Server - Ask For Help => Topic started by: osquiabro on February 17, 2020, 05:31:08 AM
-
what is a best method in NT for open a File? p web.OpenFile(myfile) or Access:myfile.Open with Access:myfile.UseFile(), what is a difference if any issue?
Thanks..
-
I try to use the p_web methods whenever possible. However, I don't think it matters in the grand scheme of things.
p_web.OpenFile(SomeFile) is simply a call to Open(SomeFile,AccessMode) with error checking.
Don
-
There's a bit of explanation here https://www.capesoft.com/docs/NetTalk11/NetTalk8Upgrade.htm#FileMethods
Jane
-
hah - was in the docs - thanks Jane :)
Personally I use the ABC methods directly in my own programs.
cheers
Bruce
-
There's a bit of explanation here https://www.capesoft.com/docs/NetTalk11/NetTalk8Upgrade.htm#FileMethods
Jane
Nice one Jane!!
-
ok this post is old but again another question about this
"there is a slight performance gain when using the ABC file methods over the p_web methods."
why NT use a old code for this??
-
I'm not sure what you mean by "old code"?
The NetTalk templates generate calls to p_wem.OpenFile etc, and that in turn uses Access: methods if the program is ABC and regular Clarion calls for Legacy.
Cheers
Bruce
-
i'm confused with this:
"Note that it is perfectly ok for you to use normal ABC file handling methods in your own hand-code. The file methods are included in the class to cater for non-ABC programs. there is a slight performance gain when using the ABC file methods over the p_web methods."
and OPEN(p_File,42h) in netweb.clw
-
ABC code is generated into WebHandler procedure. So see the OpenFile method in there - that will likely clear up your confusion.
The code in WebHander is the "derived class" - so overrides the code in netweb.clw (or supplements it if the parent method is called.)
-
Thanks!