Scope issues when using a .lss file

I have a work around for this, but I was wondering if someone can explain to me why this issue occurs when using a .lss file.

Basically, taking a suggestion from a comment Charles Robinson posted in Andre Guirard’s blog from a few days back, I took a custom class I built for making a connection to an Oracle server and turned it into a .lss file because it has uses across many different applications. However, when I went to use this .lss in another custom class, the LS editor complained when I went to compile it, because it said I was using duplicate options (both classes had Option Public and Option Declare.) So I commented out the Options on the non .lss class and that resolved my problem. However, when I access that class in an agent, I don’t get that error.

I’m assuming it has something to do with scope, but I’m not sure what. Anyone want to enlighten me?

brandt

Subject: scope issues when using a .lss file

The problem is that an include (unlike a Use) merely inserts the source code text from the included file. When you use a script library, the source code of the library is “consulted” in order to match the names and types of the variables and objects you use, but the compiled LS doesn’t become part of the current code – it’s loaded at run time. An included LSS, on the other hand, is essentially being typed into the LS editor for you, so any duplication in the source looks to the compiler like duplicates you typed in the current module.