Once more… I am really learning here, so here’s one more of my (probably basic) questions about developing an application :
I would like to have two versions of my app. with different sets of features.
Version “Light” with features ABCD, and version “PRO” with features BCDE
I suppose having two projects, and coding and maintaining most of the things two times is the WRONG way to go.
What’s the best approach ? How to do it with xojo ?
Advices ? tips ? Ideas ?
Put in conditional statements (use constants)
If LITE then
if not Lite then "E"
because yes TWO versions is NOT the way to go…
and make “A”,“B”,“C”,“D” and “E” all their own modules, so you have it all in one project, but can maintain LITE vs PRO without screwing it up
use a #if …#endif statement so that the code belonging to the pro version does not get compiled.
great! but how do I run the different versions in the debugger ?
That depends on how you implement it really.
You change the value of the constants.
Create a constant called LITE , set the value to FALSE and run the code
Stop the code, change the value to TRUE and run it again.
#if LITE works just as well as if LITE
but as pointed out, the #if version means that you can actually prevent chunks of code being in the app at all when compiled.
That means that people cannot ‘turn on’ extra features by hacking your code.
In theory they could by amending the compiled code behind
IF LITE then
to be the equivalent of if FALSE then)
cool! Got it now!
Thanks a lot!
Love single file or file edtior mode of xojo. which could let us compare the source easily bettwen different versions.
I would recommend Arbed for doing this., one of the many things i use it for, http://www.tempel.org/Arbed.