if (__pEditFieldFolderName != null)
{
folderName.Append(__pEditFieldFolderName->GetText());
- folderName.Trim();
+ //folderName.Trim();
AppLogDebug("folder value is %ls",folderName.GetPointer());
__rootPath = FolderNavigationPresentationModel::GetCurrentPath();
if (__pEditFieldFolderName != null)
{
__fileName = __pEditFieldFolderName->GetText();
- __fileName.Trim();
+ //__fileName.Trim();
}
String OriginalName = __pDirectory->GetFileName();
tempLength = ID_FILE_NAME_LENGTH_MAX;
}
- currentInput = __pEditFieldFolderName->GetText();
-
- if(currentInput.Contains(specialCharacters[0]))
+ textToCheck = __pEditFieldFolderName->GetText().GetLength() - __textLength;
+ r = currentText.SubString(__pEditFieldFolderName->GetCursorPosition() - textToCheck,currentInput);
+ for(int i = 0 ; i < currentInput.GetLength() ; i++)
{
- String invalidCharacterString;
- AppResource::GetInstance()->GetString(L"IDS_COM_POP_INVALID_CHARACTERS", invalidCharacterString);
- messageBox.Construct(L"", invalidCharacterString, MSGBOX_STYLE_NONE, ID_MESSAGE_BOX_TIMEOUT_ONE_SECOND);
- messageBox.ShowAndWait(modalResult);
- r = currentInput.Replace("/","");
- __pEditFieldFolderName->SetText(currentInput);
- __pEditFieldFolderName->SetFocus();
- AppLogDebug("result is %s",GetErrorMessage(r));
+ if(specialCharacters.Contains(currentInput[i]))
+ {
+ String invalidCharacterString;
+ AppResource::GetInstance()->GetString(L"IDS_COM_POP_INVALID_CHARACTERS", invalidCharacterString);
+ messageBox.Construct(L"", invalidCharacterString, MSGBOX_STYLE_NONE, ID_MESSAGE_BOX_TIMEOUT_ONE_SECOND);
+ messageBox.ShowAndWait(modalResult);
+ currentText.Remove(__pEditFieldFolderName->GetCursorPosition()-textToCheck,textToCheck);
+ __pEditFieldFolderName->SetText(currentText);
+ __pEditFieldFolderName->SetFocus();
+ break;
+ }
}
inputLength = byteCount;
__pEditFieldFolderName->ShowKeypad();
return;
}
+
+ r = utf8.GetByteCount(__pEditFieldFolderName->GetText(), byteCount);
+ __textLength = byteCount;
}
return;
}
if (pSceneManager != null)
{
String fileName = __pEditFieldFolderName->GetText();
- fileName.Trim();
+ //fileName.Trim();
if(__pDirectory != null)
{
__pDirectory->SetFileName(fileName);