imbricated compilation conditions seem failing

Hi
I'm discovering a strange behavior about compilation for web core => JS

    {$IFDEF DEBUG}
        {$IFDEF DEBUG_DEV}
            WebDebuglog('Sphinx Params - DEV ---');
            SphinxModule  := TDMSphinx_Dev.Create(Self);
        {$ELSE}
            WebDebuglog('Sphinx Params - PREPROD ---');
            SphinxModule  := TDMSphinx_PreProd.Create(Self);
        {$ENDIF}
    {$ELSE}
        WebDebuglog('Sphinx Params - PROD ---');
        SphinxModule  := TDMSphinx_Prod.Create(Self);
    {$ENDIF}

If I define conditions for compilation inside IDE with "DEBUG_DEV" the result in web console shows "PREPROD" contexte
image

In project file I get too

  {$IFDEF DEBUG}
    {$IFDEF DEBUG_DEV}
    DM_Sphinx_Dev in 'sphinx_modules\DM_Sphinx_Dev.pas' {DMSphinx_Dev: TWebDataModule},
    {$ELSE}
    DM_sphinx_PreProd in 'sphinx_modules\DM_sphinx_PreProd.pas' {DMSphinx_PreProd: TWebDataModule},
    {$ENDIF }
  {$ELSE}
  DM_sphinx_Prod in 'sphinx_modules\DM_sphinx_Prod.pas' {DMSphinx_Prod: TWebDataModule},
  {$ENDIF }

If I define at start of project {$DEFINE DEBUG_DEV}
I get an error at compilation
SphinxModule := TDMSphinx_Dev.Create(Self);
can't be processed as it isn't defined. It seems
DM_Sphinx_Dev in 'sphinx_modules\DM_Sphinx_Dev.pas' {DMSphinx_Dev: TWebDataModule},
isn't integrated in project.

Do you set the defines in the proper place, i.e. the TMS WEB Core options page:

Hi Bruno
Thanks for this clarification.
my bad, I didn't see this mechanism in TMS Web Core documentation (and it is here)
I tested with my code and it works

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.