PDA

View Full Version : What are these folders for?



Michael Hartlef
22-11-2009, 11:35
Hi folks,

does anyone know for what these folders in the thinBasic directory are?

SESSIONS
MOD

Petr Schreiber
22-11-2009, 12:44
Not sure about Sessions (I think something related to thinAir), but Mod directory has clear purpose.

When you develop custom module, not in official distribution, you should keep your modules in Mod directory. I have there TBDW from Marco Pontello for example.

This external modules should be also referenced in code with MODULE instead of USES, to underline fact you are using something non standard in your code. Like:


USES "TBGL", "TBAI", "TBDI"
MODULE "TBDW"


At least this was the vision when ThinBASIC project started, if I remember correctly.

Michael Hartlef
22-11-2009, 13:24
Ok, thanks for the info.

ErosOlmi
22-11-2009, 20:39
SESSIONS
This directory is used by CGI module (a never finished module) to store connection session data. This data is used to recognize users on the other end of the web (client) and keep persistent data across multiple single and separated connections using cookie mechanism.
MOD
This directory is like LIB directory and is used to put 3rd party DLLs and/or user modules.
All modules names in LIB directory must start with "thinBasic_" text while modules in MOD directory can have whatever name.
If in a script you use MODULE "modname" thinBasic will search for exact "modname.dll".
If in a script you use USES "modname" thinBasic will search for "thinBasic_modname.dll".



Ciao
Eros