PDA

View Full Version : Module directory



ErosOlmi
21-09-2005, 07:54
When developing a module, it may happen to have many files related to that module.

To keep things clean, you can create a new directory under thinBasic\Lib directory and name it with the same name of the module. During script runtime, thinBasic will search also in that directory.

For example, if you module has thinBasic_TBGL name, create thinBasic_TBGL directory under thinBasic\Lib and keep all the files related to the module in that directory.

So the following are all valid direcory modules and thinBasic, at script runtime, will search also in those directory to search for needed modules:

thinBasic\Lib\thinBasic_TBGL
thinBasic\Lib\thinBasic_RS232
thinBasic\Lib\thinBasic_DBF
...

See thinBasic online doc for USE keyword: http://www.thinbasic.com/public/products/thinBasic/help/html/uses.htm

Regards
Eros

Petr Schreiber
21-09-2005, 11:56
Good idea, thanks

I will consider it for next releases

Thanks,
Psch

ErosOlmi
21-09-2005, 12:22
For installation purpose, we can consider to to have 2 modules directories, thinBasic\Lib for official modules and thinBasic\Mod for user modules. So when you will release a module just tell your user to copy the module inside thinBasic\Mod directory.

Also I will differentiate USE keyword into USE for official modules and MOD for user modules. While USE will search for modules name starting with "thinBasic_" inside thinBasic\Lib directory, MOD will search for exact name in thinBasic\Mod directory.

Eros