Class Method and Intrisic Function Namespace Clash

Results 1 to 2 of 2

Thread: Class Method and Intrisic Function Namespace Clash

  1. #1
    Andy Smith Guest

    Default Class Method and Intrisic Function Namespace Clash

    I have a class with a method called "Replace"<BR><BR>If I try to call the "Replace" VBScript Intrisic Function from within another public function in the class, the vbscript engine calls my class&#039s "Replace" method instead of the VBScript Function.<BR><BR>How do I explicitly declare that I want to use the Intrisic Function instead of my method?

  2. #2
    Join Date
    Dec 1969

    Default VBScript is not that sophisiticated...

    So far as I can tell, VBS gives you no way to override its decisions regarding scope. Nothing like C++&#039s use of ::name to indicate global scope, for example.<BR><BR>I think you are stuck renaming your method.<BR><BR>Actually, if you think about it, VBS is being more flexible that you might expect for such a simple-minded parser as it uses. I wouldn&#039t have been surprised to find that you could *not* use *any* keyword as a method or variable name. The fact that they allow you to, essentially, override the meaning within a given class strikes me as pretty sophisticated, in comparison to the rest of the language. In this case, if you do *not* want to override the default function, well...don&#039t do it.<BR><BR>Good luck! Thanks for pointing out that this was even possible. I would never have tried it, myself, simply assuming it wouldn&#039t work!<BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts