changes from relative path to absolute path in interpret.cpp and validation of empty entry in ncidialog

This commit is contained in:
varada%netscape.com 1999-10-15 07:43:57 +00:00
Родитель e6573be100
Коммит b047e40e55
2 изменённых файлов: 23 добавлений и 13 удалений

Просмотреть файл

@ -56,12 +56,18 @@ void CNewDialog::DDV_INIFile(CDataExchange* pDX, CString value)
{
if(pDX->m_bSaveAndValidate)
{
if(value.Right(4) != ".nci")
value.TrimRight();
if(value.IsEmpty())
{
value = value +".nci";
CWnd nbox;
nbox.MessageBox("We have appended '.nci' to the file" ,"value",MB_ICONEXCLAMATION);
nbox.MessageBox("Please enter a Configuration Name" ,"Error",MB_ICONEXCLAMATION);
pDX->Fail();
}
else if(value.Right(4) != ".nci")
value = value +".nci";
myData = value;
}
}

Просмотреть файл

@ -371,8 +371,11 @@ BOOL CInterpret::interpret(CString cmds, WIDGET *curWidget)
if (p2)
*p2++ = '\0';
else
p2 = "Enter a Verification Value";
{
AfxMessageBox("Please Enter Verification Value for" + CString(parms),MB_OK);
exit(12);
}
CString Getval = replaceVars(parms, NULL);
if (strcmp(Getval,p2) ==0)
@ -410,18 +413,19 @@ BOOL CInterpret::interpret(CString cmds, WIDGET *curWidget)
}
else if (strcmp(pcmd, "inform") == 0)
{
char *p2 = strchr(parms, ',');
if (p2)
*p2++ = '\0';
else
p2 = "Specify Directory here";
CString entryName;
CWnd myWnd;
char localPath[MAX_SIZE] = {'\0'};
char infoPath[MAX_SIZE] = {'\0'};
strcpy(infoPath, currDirPath);
if (localPath) {
strcat(infoPath, localPath);
}
entryName = theApp.GetGlobal(parms);
CString p2path = replaceVars(p2,NULL);
if (entryName != "") {
myWnd.MessageBox( entryName + " is saved in " + CString(infoPath), "Information", MB_OK);
myWnd.MessageBox( entryName + " is saved in " + p2path, "Information", MB_OK);
}
// Delete the global var now...
}