Hi all,
I just want to give everyone a heads up on one of the many great new features coming down the road in version 3.1. I am telling you now so that you can plan accordingly.
In Active4D 3.0, you must explicitly import every library you want to use in every execution of the interpreter. In other words, and import lasts only as long as the current execution of Active4D.
In Active4D 3.1, once a library is imported, it stays imported for the life of 4D (unless you flush it). In addition, if you use the full library.method syntax, the library will be auto-imported for you if it has not already been imported.
I feel this will make library usage a lot easier, as you will no longer have to remember when and where you imported a library. If you prefer, you can just import all of your libraries in On Application Start and be done with it.
This change can uncover errors which you did not see before. For example, if you call a method which has the same name in two different libraries, and previously you never imported the two libraries during the same execution, in v3.1 this will generate an ambiguous method name error, because the libraries remain imported.
To avoid any potential problems, I recommend that you ALWAYS use the full library.method syntax when calling library methods or referencing library constants, for the following reasons:
- It will avoid the kind of error described above, because you are always specifying which library the method belongs to.
- It much, much faster. When I get an unqualified method name, before I can determine it is a library method I have to search all of the built-in keywords and command names before I even begin searching the libraries. And since all of your libraries will remain imported, I have to search all of the imported libraries for the name. On the other hand, if you use the library.method syntax, I only have to search the named library.
- In 3.1, if you use the full library.method syntax, the library will be auto-imported for you if it has not been imported already.
So the bottom line is, I recommend you get used to using the full library.method syntax.
Regards,
Aparajita Victory-Heart Productions [EMAIL PROTECTED] www.aparajitaworld.com
"If you dare to fail, you are bound to succeed." - Sri Chinmoy | www.srichinmoylibrary.com
