Public g_xxProject, g_xxMenuOutFile, g_xxMenuSourceFile
Then after the "No ! in menu name" bit of code, add thesem.g_xxProject = JustFname(m.g_projdbf) m.g_xxMenuOutFile = JustFName(m.g_outfile) m.g_xxMenuSourceFile = JustFname(m.g_mnxfile[1])Create a project hook - you probably already have one that
LOCAL lcProjPath, lcMenuOutPath, lcMenuSourcePath IF nError = 0 And File(m.g_xxMenuOutFile) * get paths from the global vars from genmenu m.lcProjPath = JUSTPATH(FULLPATH(m.g_xxProject)) m.lcMenuOutPath = JUSTPATH(FULLPATH(m.g_xxMenuOutFile)) m.lcMenuSourcePath = JustPath(FullPath(m.g_xxMenuSourceFile)) * if menu output file in same directory as project * move it into the same directory as the menu source file IF m.lcMenuOutPath = m.lcProjPath * if it already exists, dump it If File(AddBs(m.lcMenuSourcePath) + m.g_xxMenuOutFile) Erase (AddBs(m.lcMenuSourcePath) + m.g_xxMenuOutFile) Endif * move it RENAME (AddBs(m.lcProjPath) + m.g_xxMenuOutFile) to ; (AddBs(m.lcMenuSourcePath) + m.g_xxMenuOutFile) ENDIF Endif>Hi Alan,
>* >* VALIDPARAMS - Validate generator parameters. >* >* Description: >* Attempt to open the project database. If error encountered then >* on error routine takes over and issues 'CANCEL'. The output file >* cannot be erased, name not known. >* >FUNCTION validparams > >*-- ... > >* No ! in menu name [Rev: 6][END] > >*-------------------------------------------------------------- >*-- Added Nd, 07/09/02 >*-- Overwrite path in m.g_outfile with the path to the mnx >*-- file. >*-------------------------------------------------------------- >m.g_outfile = FORCEPATH( m.g_outfile, JUSTPATH(g_mnxfile[1]) ) >*-------------------------------------------------------------- >*-- End Added Nd, 07/09/02 >*-------------------------------------------------------------- > >* >* REFRESHPREFS - Refresh comment style and developer preferences. >* >>