Coding Idioms for Searchbar
authorAyush <ayush.sriv@samsung.com>
Wed, 21 Aug 2013 12:14:16 +0000 (17:44 +0530)
committerAyush <ayush.sriv@samsung.com>
Fri, 6 Sep 2013 11:55:42 +0000 (17:25 +0530)
Change-Id: If9754ad7c57e32b5734ffd2c5a194f2fe61ff524
Signed-off-by: Ayush <ayush.sriv@samsung.com>
src/ui/controls/FUiCtrl_SearchBar.cpp
src/ui/controls/FUiCtrl_SearchBarEvent.cpp
src/ui/controls/FUiCtrl_SearchBarImpl.cpp
src/ui/controls/FUiCtrl_SearchBarPresenter.cpp
src/ui/inc/FUiCtrl_SearchBar.h
src/ui/inc/FUiCtrl_SearchBarImpl.h

index 846090b..220d58d 100644 (file)
 #include <FBaseErrorDefine.h>
 #include <FBaseSysLog.h>
 #include <FGrp_BitmapImpl.h>
-#include "FUiAnim_VisualElement.h"
+#include <FSys_SettingInfoImpl.h>
 #include "FUi_ResourceManager.h"
+#include "FUi_FocusManagerImpl.h"
+#include "FUi_AccessibilityContainer.h"
+#include "FUi_AccessibilityElement.h"
+#include "FUi_AccessibilityManager.h"
+#include "FUi_CoordinateSystemUtils.h"
+#include "FUiAnim_VisualElement.h"
 #include "FUiCtrl_SearchBar.h"
 #include "FUiCtrl_SearchBarPresenter.h"
 #include "FUiCtrl_Form.h"
 #include "FUiCtrl_ActionEvent.h"
 #include "FUiCtrl_TextBlockEvent.h"
 #include "FUiCtrl_TextEvent.h"
-#include "FUi_AccessibilityContainer.h"
-#include "FUi_AccessibilityElement.h"
-#include "FUi_AccessibilityManager.h"
-#include "FUi_CoordinateSystemUtils.h"
 #include "FUiCtrl_SearchBarImpl.h"
 #include "FUiCtrl_EditFieldImpl.h"
 #include "FUiCtrl_ButtonImpl.h"
-#include "FUi_FocusManagerImpl.h"
-#include <FSys_SettingInfoImpl.h>
 
 
 using namespace Tizen::Graphics;
@@ -167,8 +167,8 @@ _SearchBar::~_SearchBar(void)
 _SearchBar*
 _SearchBar::CreateSearchBarN(void)
 {
-       _SearchBar* pSearchBar = new (std::nothrow) _SearchBar;
-       SysTryReturn(NID_UI_CTRL, pSearchBar, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+       _SearchBar* pSearchBar = new (std::nothrow) _SearchBar();
+       SysTryReturn(NID_UI_CTRL, pSearchBar != null, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
        if (GetLastResult() != E_SUCCESS)
        {
                delete pSearchBar;
@@ -201,7 +201,7 @@ _SearchBar::Initialize(bool enableSearchBarButton, CoreKeypadAction keypadAction
 
        for (int i = 0; i < SEARCHBAR_COLOR_MAX; i++)
        {
-               switch(i)
+               switch (i)
                {
                case SEARCH_FIELD_STATUS_DISABLED:
                        GET_COLOR_CONFIG(SEARCHBAR::EDIT_BG_DISABLED, __color[i]);
@@ -231,22 +231,22 @@ _SearchBar::Initialize(bool enableSearchBarButton, CoreKeypadAction keypadAction
 
        r = CreateClippedGroupControl();
        SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, E_SYSTEM,
-                    "[E_SYSTEM] A system error has occurred. The construction of parent control for clipped group control failed.");
+                        "[%s] A system error has occurred. The construction of parent control for clipped group control failed.", GetErrorMessage(E_SYSTEM));
 
        r = CreateSearchField();
        SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, E_SYSTEM,
-                    "[E_SYSTEM] A system error has occurred. The edit construction failed.");
+                        "[%s] A system error has occurred. The edit construction failed.", GetErrorMessage(E_SYSTEM));
        r = CreateCancelButton();
        SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, E_SYSTEM,
-                    "[E_SYSTEM] A system error has occurred. The cancel button construction failed.");
+                        "[%s] A system error has occurred. The cancel button construction failed.", GetErrorMessage(E_SYSTEM));
 
        SetContentsArea();
        r = CreateContentsArea();
        SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, E_SYSTEM,
-                    "[E_SYSTEM] A system error has occurred. The construction of parent for content failed.");
+                        "[%s] A system error has occurred. The construction of parent for content failed.", GetErrorMessage(E_SYSTEM));
 
-       _SearchBarPresenter* pPresenter = new (std::nothrow) _SearchBarPresenter;
-       SysTryReturn(NID_UI_CTRL, pPresenter, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+       _SearchBarPresenter* pPresenter = new (std::nothrow) _SearchBarPresenter();
+       SysTryReturn(NID_UI_CTRL, pPresenter != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
 
        r = pPresenter->Construct(*this);
        SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
@@ -318,10 +318,12 @@ _SearchBar::CreateSearchField(void)
        editBounds.height = (editBounds.height > searchFieldMinHeight) ? editBounds.height : searchFieldMinHeight;
 
        _SearchBarImpl* pSearchBarImpl = static_cast<_SearchBarImpl*>(GetUserData());
-       __pEdit = &(pSearchBarImpl->GetEditFieldImpl()->GetCore());
+       SysTryReturnResult(NID_UI_CTRL, pSearchBarImpl != null, E_SYSTEM,
+                          "A system error has occurred. Failed to get _SearchBarImpl instance.");
 
+       __pEdit = &(pSearchBarImpl->GetEditFieldImpl()->GetCore());
        SysTryReturnResult(NID_UI_CTRL, __pEdit != null, E_SYSTEM,
-                          "A system error has occured. Failed to get _Edit instance");
+                          "A system error has occurred. Failed to get _Edit instance.");
 
        __pEdit->SetKeypadCommandButtonVisible(false);
        __pEdit->SetBounds(editBounds);
@@ -352,7 +354,7 @@ _SearchBar::CreateSearchField(void)
 
        r = __pClippedGroupControl->AttachChild(*__pEdit);
        SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM,
-                   "[E_SYSTEM] A system error has occurred. Failed to attach edit as child.");
+                       "[%s] A system error has occurred. Failed to attach edit as child.", GetErrorMessage(E_SYSTEM));
 
        return E_SUCCESS;
 
@@ -374,10 +376,12 @@ _SearchBar::CreateCancelButton(void)
        _ControlOrientation orientation = _ControlManager::GetInstance()->GetOrientation();
 
        _SearchBarImpl* pSearchBarImpl = static_cast<_SearchBarImpl*>(GetUserData());
-       __pCancelButton = &(pSearchBarImpl->GetButtonImpl()->GetCore());
+       SysTryReturnResult(NID_UI_CTRL, pSearchBarImpl != null, E_SYSTEM,
+                          "A system error has occurred. Failed to get _SearchBarImpl instance.");
 
+       __pCancelButton = &(pSearchBarImpl->GetButtonImpl()->GetCore());
        SysTryReturnResult(NID_UI_CTRL, __pCancelButton != null, E_SYSTEM,
-                          "A system error has occured. Failed to get _Edit instance");
+                          "A system error has occurred. Failed to get _Button instance.");
 
        r = GetLastResult();
        SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
@@ -417,7 +421,7 @@ _SearchBar::CreateCancelButton(void)
 
        r = __pClippedGroupControl->AttachChild(*__pCancelButton);
        SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM,
-                   "[E_SYSTEM] A system error has occurred. Failed to attach button as child.");
+                       "[%s] A system error has occurred. Failed to attach button as child.", GetErrorMessage(E_SYSTEM));
 
        return E_SUCCESS;
 
@@ -442,7 +446,7 @@ _SearchBar::CreateContentsArea(void)
 
        r = AttachChild(*__pContainer);
        SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM,
-                   "[E_SYSTEM] A system error has occurred. Failed to attach the parent of content.");
+                       "[%s] A system error has occurred. Failed to attach the parent of content.", GetErrorMessage(E_SYSTEM));
 
        return E_SUCCESS;
 
@@ -519,8 +523,8 @@ _SearchBar::UpdateContentArea(bool invalidate)
 result
 _SearchBar::SetContentAreaVisible(bool visible, bool isCalledByApp)
 {
-       SysTryReturn(NID_UI_CTRL, __pContainer, E_SYSTEM, E_SYSTEM,
-                    "[E_SYSTEM] A system error has occurred. The instance of parent to content is null.");
+       SysTryReturn(NID_UI_CTRL, __pContainer != null, E_SYSTEM, E_SYSTEM,
+                        "[%s] A system error has occurred. The instance of parent to content is null.", GetErrorMessage(E_SYSTEM));
 
        SearchBarMode searchBarMode = GetMode();
        if (searchBarMode == SEARCH_BAR_MODE_INPUT)
@@ -666,8 +670,8 @@ _SearchBar::GetButtonTextColor(SearchBarButtonStatus status) const
 SearchBarButtonStatus
 _SearchBar::GetButtonStatus(void) const
 {
-       SysTryReturn(NID_UI_CTRL, __pCancelButton, SEARCH_BAR_BUTTON_STATUS_NORMAL, E_SYSTEM,
-                    "[E_SYSTEM] A system error has occurred. The cancel button instance is null.");
+       SysTryReturn(NID_UI_CTRL, __pCancelButton != null, SEARCH_BAR_BUTTON_STATUS_NORMAL, E_SYSTEM,
+                        "[%s] A system error has occurred. The _Button instance is null.", GetErrorMessage(E_SYSTEM));
 
        SearchBarButtonStatus buttonStatus = SEARCH_BAR_BUTTON_STATUS_NORMAL;
 
@@ -682,14 +686,14 @@ _SearchBar::GetButtonStatus(void) const
 result
 _SearchBar::SetButtonText(const String& text)
 {
-       SysTryReturn(NID_UI_CTRL, __pCancelButton, E_SYSTEM, E_SYSTEM,
-                    "[E_SYSTEM] A system error has occurred. The cancel button instance is null.");
+       SysTryReturn(NID_UI_CTRL, __pCancelButton != null, E_SYSTEM, E_SYSTEM,
+                        "[%s] A system error has occurred. The _Button instance is null.", GetErrorMessage(E_SYSTEM));
 
        result r = E_SUCCESS;
 
        r = __pCancelButton->SetText(text);
        SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, E_SYSTEM,
-                    "[E_SYSTEM] A system error has occurred. Failed to set text.");
+                        "[%s] A system error has occurred. Failed to set text.", GetErrorMessage(E_SYSTEM));
 
        __isButtonTextChangedByApp = true;
 
@@ -705,8 +709,8 @@ _SearchBar::SetButtonActionId(int actionId)
 result
 _SearchBar::SetButtonEnabled(bool enabled)
 {
-       SysTryReturn(NID_UI_CTRL, __pCancelButton, E_SYSTEM, E_SYSTEM,
-                    "[E_SYSTEM] A system error has occurred. The cancel button instance is null.");
+       SysTryReturn(NID_UI_CTRL, __pCancelButton != null, E_SYSTEM, E_SYSTEM,
+                        "[%s] A system error has occurred. The _Button instance is null.", GetErrorMessage(E_SYSTEM));
 
        __pCancelButton->SetEnableState(enabled);
 
@@ -770,16 +774,16 @@ _SearchBar::SetButtonTextColor(SearchBarButtonStatus status, const Color& color)
 result
 _SearchBar::AppendCharacter(const Character& character)
 {
-       SysTryReturn(NID_UI_CTRL, __pEdit, E_SYSTEM, E_SYSTEM,
-                    "[E_SYSTEM] A system error has occurred. The edit instance is null.");
+       SysTryReturn(NID_UI_CTRL, __pEdit != null, E_SYSTEM, E_SYSTEM,
+                        "[%s] A system error has occurred. The _Edit instance is null.", GetErrorMessage(E_SYSTEM));
        SysTryReturn(NID_UI_CTRL, character.CompareTo(null), E_SYSTEM, E_SYSTEM,
-                    "[E_SYSTEM] A system error has occurred. The character is null.");
+                        "[%s] A system error has occurred. The character is null.", GetErrorMessage(E_SYSTEM));
 
        result r = E_SUCCESS;
 
        r = __pEdit->AppendCharacter(character);
        SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, E_SYSTEM,
-                    "[E_SYSTEM] A system error has occurred. Failed to set character.");
+                        "[%s] A system error has occurred. Failed to set character.", GetErrorMessage(E_SYSTEM));
 
        return r;
 }
@@ -787,16 +791,16 @@ _SearchBar::AppendCharacter(const Character& character)
 result
 _SearchBar::AppendText(const String& text)
 {
-       SysTryReturn(NID_UI_CTRL, __pEdit, E_SYSTEM, E_SYSTEM,
-                    "[E_SYSTEM] A system error has occurred. The edit instance is null.");
+       SysTryReturn(NID_UI_CTRL, __pEdit != null, E_SYSTEM, E_SYSTEM,
+                        "[%s] A system error has occurred. The _Edit instance is null.", GetErrorMessage(E_SYSTEM));
        SysTryReturn(NID_UI_CTRL, text.IsEmpty() == false, E_SYSTEM, E_SYSTEM,
-                    "[E_SYSTEM] A system error has occurred. The text is empty.");
+                        "[%s] A system error has occurred. The text is empty.", GetErrorMessage(E_SYSTEM));
 
        result r = E_SUCCESS;
 
        r = __pEdit->AppendText(text);
        SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, E_SYSTEM,
-                    "[E_SYSTEM] A system error has occurred. Failed to set text.");
+                        "[%s] A system error has occurred. Failed to set text.", GetErrorMessage(E_SYSTEM));
 
        return r;
 }
@@ -804,19 +808,19 @@ _SearchBar::AppendText(const String& text)
 result
 _SearchBar::SetText(const String& text)
 {
-       SysTryReturn(NID_UI_CTRL, __pEdit, E_SYSTEM, E_SYSTEM,
-                    "[E_SYSTEM] A system error has occurred. The edit instance is null.");
+       SysTryReturn(NID_UI_CTRL, __pEdit != null, E_SYSTEM, E_SYSTEM,
+                        "[%s] A system error has occurred. The _Edit instance is null.", GetErrorMessage(E_SYSTEM));
 
        result r = E_SUCCESS;
 
        int limitLength = __pEdit->GetTextLimitLength();
        int textLength = text.GetLength();
        SysTryReturn(NID_UI_CTRL, limitLength >= textLength, E_SYSTEM, E_SYSTEM,
-                    "[E_SYSTEM] A system error has occurred. textLength exceeds the limitLength");
+                        "[%s] A system error has occurred. textLength exceeds the limitLength", GetErrorMessage(E_SYSTEM));
 
        r = __pEdit->SetText(text);
        SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, E_SYSTEM,
-                    "[E_SYSTEM] A system error has occurred. Failed to set text.");
+                        "[%s] A system error has occurred. Failed to set text.", GetErrorMessage(E_SYSTEM));
 
        return r;
 }
@@ -824,12 +828,12 @@ _SearchBar::SetText(const String& text)
 result
 _SearchBar::InsertCharacterAt(int index, const Character& character)
 {
-       SysTryReturn(NID_UI_CTRL, __pEdit, E_SYSTEM, E_SYSTEM,
-                    "[E_SYSTEM] A system error has occurred. The edit instance is null.");
+       SysTryReturn(NID_UI_CTRL, __pEdit != null, E_SYSTEM, E_SYSTEM,
+                        "[%s] A system error has occurred. The _Edit instance is null.", GetErrorMessage(E_SYSTEM));
        SysTryReturn(NID_UI_CTRL, index > -1, E_OUT_OF_RANGE, E_OUT_OF_RANGE,
-                    "[E_OUT_OF_RANGE] index(%d) is out of range.", index);
+                        "[%s] index(%d) is out of range.", GetErrorMessage(E_OUT_OF_RANGE), index);
        SysTryReturn(NID_UI_CTRL, character.CompareTo(null), E_SYSTEM, E_SYSTEM,
-                    "[E_SYSTEM] A system error has occurred. The character is null.");
+                        "[%s] A system error has occurred. The character is null.", GetErrorMessage(E_SYSTEM));
 
        result r = E_SUCCESS;
 
@@ -839,14 +843,14 @@ _SearchBar::InsertCharacterAt(int index, const Character& character)
        textLength = __pEdit->GetTextLength() + 1;
 
        SysTryReturn(NID_UI_CTRL, limitLength >= textLength, E_MAX_EXCEEDED, E_MAX_EXCEEDED,
-                    "[E_MAX_EXCEEDED] limitLength(%d) exceeds the maximum limit textLength(%d).", limitLength, textLength);
+                        "[%s] limitLength(%d) exceeds the maximum limit textLength(%d).", GetErrorMessage(E_MAX_EXCEEDED), limitLength, textLength);
 
        SysTryReturn(NID_UI_CTRL, index <= __pEdit->GetTextLength(), E_OUT_OF_RANGE, E_OUT_OF_RANGE,
-                    "[E_OUT_OF_RANGE] index(%d) is out of range of current textLength(%d).", index, __pEdit->GetTextLength());
+                        "[%s] index(%d) is out of range of current textLength(%d).", GetErrorMessage(E_OUT_OF_RANGE), index, __pEdit->GetTextLength());
 
        r = __pEdit->InsertCharacterAt(index, character);
        SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, E_SYSTEM,
-                    "[E_SYSTEM] A system error has occurred. Failed to set text.");
+                        "[%s] A system error has occurred. Failed to set text.", GetErrorMessage(E_SYSTEM));
 
        return r;
 }
@@ -854,10 +858,10 @@ _SearchBar::InsertCharacterAt(int index, const Character& character)
 result
 _SearchBar::InsertTextAt(int index, const String& text)
 {
-       SysTryReturn(NID_UI_CTRL, __pEdit, E_SYSTEM, E_SYSTEM,
-                    "[E_SYSTEM] A system error has occurred. The edit instance is null.");
+       SysTryReturn(NID_UI_CTRL, __pEdit != null, E_SYSTEM, E_SYSTEM,
+                        "[%s] A system error has occurred. The _Edit instance is null.", GetErrorMessage(E_SYSTEM));
        SysTryReturn(NID_UI_CTRL, index > -1, E_OUT_OF_RANGE, E_OUT_OF_RANGE,
-                    "[E_OUT_OF_RANGE] index(%d) is out of range.", index);
+                        "[%s] index(%d) is out of range.", GetErrorMessage(E_OUT_OF_RANGE), index);
 
        result r = E_SUCCESS;
 
@@ -867,13 +871,13 @@ _SearchBar::InsertTextAt(int index, const String& text)
        textLength = __pEdit->GetTextLength() + text.GetLength();
 
        SysTryReturn(NID_UI_CTRL, limitLength >= textLength, E_MAX_EXCEEDED, E_MAX_EXCEEDED,
-                    "[E_MAX_EXCEEDED] limitLength(%d) exceeds the maximum limit textLength(%d).", limitLength, textLength);
+                        "[%s] limitLength(%d) exceeds the maximum limit textLength(%d).", GetErrorMessage(E_MAX_EXCEEDED), limitLength, textLength);
        SysTryReturn(NID_UI_CTRL, index <= __pEdit->GetTextLength(), E_OUT_OF_RANGE, E_OUT_OF_RANGE,
-                    "[E_OUT_OF_RANGE] index(%d) is out of range of current textLength(%d).", index, __pEdit->GetTextLength());
+                        "[%s] index(%d) is out of range of current textLength(%d).", GetErrorMessage(E_OUT_OF_RANGE), index, __pEdit->GetTextLength());
 
        r = __pEdit->InsertTextAt(index, text);
        SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, E_SYSTEM,
-                    "[E_SYSTEM] A system error has occurred. Failed to insert text.");
+                        "[%s] A system error has occurred. Failed to insert text.", GetErrorMessage(E_SYSTEM));
 
        return r;
 }
@@ -881,21 +885,21 @@ _SearchBar::InsertTextAt(int index, const String& text)
 result
 _SearchBar::DeleteCharacterAt(int index)
 {
-       SysTryReturn(NID_UI_CTRL, __pEdit, E_SYSTEM, E_SYSTEM,
-                    "[E_SYSTEM] A system error has occurred. The edit instance is null.");
+       SysTryReturn(NID_UI_CTRL, __pEdit != null, E_SYSTEM, E_SYSTEM,
+                        "[%s] A system error has occurred. The _Edit instance is null.", GetErrorMessage(E_SYSTEM));
        SysTryReturn(NID_UI_CTRL, index > -1, E_INVALID_ARG, E_INVALID_ARG,
-                    "[E_INVALID_ARG] Invalid argument(s) is used. index = %d", index);
+                        "[%s] Invalid argument(s) is used. index = %d", GetErrorMessage(E_INVALID_ARG), index);
 
        result r = E_SUCCESS;
        int textLength = 0;
        textLength = __pEdit->GetTextLength();
 
        SysTryReturn(NID_UI_CTRL, textLength > index, E_OUT_OF_RANGE, E_OUT_OF_RANGE,
-                    "[E_OUT_OF_RANGE] index(%d) is out of range. textLength(%d)", index, textLength);
+                        "[%s] index(%d) is out of range. textLength(%d)", GetErrorMessage(E_OUT_OF_RANGE), index, textLength);
 
        r = __pEdit->DeleteCharacterAt(index);
        SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM,
-                          "A system error has occured. Failed to delete character.");
+                          "A system error has occurred. Failed to delete character.");
 
        return r;
 }
@@ -903,8 +907,8 @@ _SearchBar::DeleteCharacterAt(int index)
 result
 _SearchBar::Clear(void)
 {
-       SysTryReturn(NID_UI_CTRL, __pEdit, E_SYSTEM, E_SYSTEM,
-                    "[E_SYSTEM] A system error has occurred. The edit instance is null.");
+       SysTryReturn(NID_UI_CTRL, __pEdit != null, E_SYSTEM, E_SYSTEM,
+                        "[%s] A system error has occurred. The _Edit instance is null.", GetErrorMessage(E_SYSTEM));
 
        return __pEdit->ClearText();
 }
@@ -912,8 +916,8 @@ _SearchBar::Clear(void)
 int
 _SearchBar::GetTextLength(void) const
 {
-       SysTryReturn(NID_UI_CTRL, __pEdit, -1, E_SYSTEM,
-                    "[E_SYSTEM] A system error has occurred. The edit instance is null.");
+       SysTryReturn(NID_UI_CTRL, __pEdit != null, -1, E_SYSTEM,
+                        "[%s] A system error has occurred. The _Edit instance is null.", GetErrorMessage(E_SYSTEM));
 
        return __pEdit->GetTextLength();
 }
@@ -921,8 +925,8 @@ _SearchBar::GetTextLength(void) const
 String
 _SearchBar::GetText(void) const
 {
-       SysTryReturn(NID_UI_CTRL, __pEdit, String(), E_SYSTEM,
-                    "[E_SYSTEM] A system error has occurred. The edit instance is null.");
+       SysTryReturn(NID_UI_CTRL, __pEdit != null, String(), E_SYSTEM,
+                        "[%s] A system error has occurred. The _Edit instance is null.", GetErrorMessage(E_SYSTEM));
 
        return __pEdit->GetText();
 }
@@ -930,8 +934,8 @@ _SearchBar::GetText(void) const
 String
 _SearchBar::GetText(int start, int end) const
 {
-       SysTryReturn(NID_UI_CTRL, __pEdit, String(), E_SYSTEM,
-                    "[E_SYSTEM] A system error has occurred. The edit instance is null.");
+       SysTryReturn(NID_UI_CTRL, __pEdit != null, String(), E_SYSTEM,
+                        "[%s] A system error has occurred. The _Edit instance is null.", GetErrorMessage(E_SYSTEM));
 
        return __pEdit->GetText(start, end);
 }
@@ -939,8 +943,8 @@ _SearchBar::GetText(int start, int end) const
 int
 _SearchBar::GetLimitLength(void) const
 {
-       SysTryReturn(NID_UI_CTRL, __pEdit, -1, E_SYSTEM,
-                    "[E_SYSTEM] A system error has occurred. The edit instance is null.");
+       SysTryReturn(NID_UI_CTRL, __pEdit != null, -1, E_SYSTEM,
+                        "[%s] A system error has occurred. The _Edit instance is null.", GetErrorMessage(E_SYSTEM));
 
        return __pEdit->GetTextLimitLength();
 }
@@ -948,16 +952,16 @@ _SearchBar::GetLimitLength(void) const
 result
 _SearchBar::SetLimitLength(int limitLength)
 {
-       SysTryReturn(NID_UI_CTRL, __pEdit, E_SYSTEM, E_SYSTEM,
-                    "[E_SYSTEM] A system error has occurred. The edit instance is null.");
+       SysTryReturn(NID_UI_CTRL, __pEdit != null, E_SYSTEM, E_SYSTEM,
+                        "[%s] A system error has occurred. The _Edit instance is null.", GetErrorMessage(E_SYSTEM));
        SysTryReturn(NID_UI_CTRL, limitLength > 0, E_INVALID_ARG, E_INVALID_ARG,
-                    "[E_INVALID_ARG] Invalid argument(s) is used.limitLength = %d", limitLength);
+                        "[%s] Invalid argument(s) is used.limitLength = %d", GetErrorMessage(E_INVALID_ARG), limitLength);
 
        String tempString = GetText();
 
        int textLength = tempString.GetLength();
        SysTryReturn(NID_UI_CTRL, limitLength >= textLength, E_INVALID_ARG, E_INVALID_ARG,
-                    "[E_INVALID_ARG] Invalid argument(s) is used. limitLength = %d, textLength = %d", limitLength, textLength);
+                        "[%s] Invalid argument(s) is used. limitLength = %d, textLength = %d", GetErrorMessage(E_INVALID_ARG), limitLength, textLength);
 
        result r = __pEdit->SetLimitLength(limitLength);
        SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
@@ -971,24 +975,24 @@ _SearchBar::SetLimitLength(int limitLength)
 result
 _SearchBar::ShowKeypad(void) const
 {
-       SysTryReturn(NID_UI_CTRL, __pEdit, E_SYSTEM, E_SYSTEM,
-                    "[E_SYSTEM] A system error has occurred. The edit instance is null.");
+       SysTryReturn(NID_UI_CTRL, __pEdit != null, E_SYSTEM, E_SYSTEM,
+                        "[%s] A system error has occurred. The _Edit instance is null.", GetErrorMessage(E_SYSTEM));
 
        SearchBarMode mode = __pSearchBarPresenter->GetMode();
        SysTryReturn(NID_UI_CTRL, mode == SEARCH_BAR_MODE_INPUT, E_INVALID_STATE, E_INVALID_STATE,
-                    "[E_INVALID_STATE] The SearchBar is currently in Normal mode.");
+                        "[%s] The SearchBar is currently in Normal mode.", GetErrorMessage(E_INVALID_STATE));
        return __pEdit->ShowKeypad();
 }
 
 result
 _SearchBar::HideKeypad(void)
 {
-       SysTryReturn(NID_UI_CTRL, __pEdit, E_SYSTEM, E_SYSTEM,
-                    "[E_SYSTEM] A system error has occurred. The edit instance is null.");
+       SysTryReturn(NID_UI_CTRL, __pEdit != null, E_SYSTEM, E_SYSTEM,
+                        "[%s] A system error has occurred. The _Edit instance is null.", GetErrorMessage(E_SYSTEM));
 
        SearchBarMode mode = __pSearchBarPresenter->GetMode();
        SysTryReturn(NID_UI_CTRL, mode == SEARCH_BAR_MODE_INPUT, E_SYSTEM, E_SYSTEM,
-                    "[E_SYSTEM] A system error has occurred. The SearchBar is currently in Normal mode.");
+                        "[%s] A system error has occurred. The SearchBar is currently in Normal mode.", GetErrorMessage(E_SYSTEM));
 
        result r = __pEdit->HideKeypad();
 
@@ -1000,8 +1004,8 @@ _SearchBar::HideKeypad(void)
 float
 _SearchBar::GetSearchFieldTextSizeF(void) const
 {
-       SysTryReturn(NID_UI_CTRL, __pEdit, -1, E_SYSTEM,
-                    "[E_SYSTEM] A system error has occurred. The edit instance is null.");
+       SysTryReturn(NID_UI_CTRL, __pEdit != null, -1, E_SYSTEM,
+                        "[%s] A system error has occurred. The _Edit instance is null.", GetErrorMessage(E_SYSTEM));
 
        return __pEdit->GetTextSizeF();
 }
@@ -1009,8 +1013,8 @@ _SearchBar::GetSearchFieldTextSizeF(void) const
 result
 _SearchBar::SetSearchFieldTextSize(float size)
 {
-       SysTryReturn(NID_UI_CTRL, __pEdit, E_SYSTEM, E_SYSTEM,
-                    "[E_SYSTEM] A system error has occurred. The edit instance is null.");
+       SysTryReturn(NID_UI_CTRL, __pEdit != null, E_SYSTEM, E_SYSTEM,
+                        "[%s] A system error has occurred. The _Edit instance is null.", GetErrorMessage(E_SYSTEM));
 
        return __pEdit->SetTextSize(size);
 }
@@ -1018,15 +1022,15 @@ _SearchBar::SetSearchFieldTextSize(float size)
 result
 _SearchBar::GetBlockRange(int& start, int& end) const
 {
-       SysTryReturn(NID_UI_CTRL, __pEdit, E_SYSTEM, E_SYSTEM,
-                    "[E_SYSTEM] A system error has occurred. The edit instance is null.");
+       SysTryReturn(NID_UI_CTRL, __pEdit != null, E_SYSTEM, E_SYSTEM,
+                        "[%s] A system error has occurred. The _Edit instance is null.", GetErrorMessage(E_SYSTEM));
 
        int startIndex = -1;
        int endIndex = -1;
 
        __pEdit->GetBlockRange(startIndex, endIndex);
        SysTryReturn(NID_UI_CTRL, (startIndex > -1 && endIndex > 0), E_SYSTEM, E_SYSTEM,
-                    "[E_SYSTEM] A system error has occurred. Failed to get text block range.");
+                        "[%s] A system error has occurred. Failed to get text block range.", GetErrorMessage(E_SYSTEM));
 
        start = startIndex;
        end = endIndex - 1;
@@ -1037,8 +1041,8 @@ _SearchBar::GetBlockRange(int& start, int& end) const
 result
 _SearchBar::ReleaseBlock(void)
 {
-       SysTryReturn(NID_UI_CTRL, __pEdit, E_SYSTEM, E_SYSTEM,
-                    "[E_SYSTEM] A system error has occurred. The edit instance is null.");
+       SysTryReturn(NID_UI_CTRL, __pEdit != null, E_SYSTEM, E_SYSTEM,
+                        "[%s] A system error has occurred. The _Edit instance is null.", GetErrorMessage(E_SYSTEM));
 
        result r = E_SUCCESS;
 
@@ -1054,8 +1058,8 @@ _SearchBar::ReleaseBlock(void)
 result
 _SearchBar::SetBlockRange(int start, int end)
 {
-       SysTryReturn(NID_UI_CTRL, __pEdit, E_SYSTEM, E_SYSTEM,
-                    "[E_SYSTEM] A system error has occurred. The edit instance is null.");
+       SysTryReturn(NID_UI_CTRL, __pEdit != null, E_SYSTEM, E_SYSTEM,
+                        "[%s] A system error has occurred. The _Edit instance is null.", GetErrorMessage(E_SYSTEM));
 
        result r = E_SUCCESS;
 
@@ -1063,18 +1067,18 @@ _SearchBar::SetBlockRange(int start, int end)
        textLength = __pEdit->GetTextLength();
 
        SysTryReturn(NID_UI_CTRL, (start < end && start >= 0 && textLength >= end), E_OUT_OF_RANGE, E_OUT_OF_RANGE,
-                    "[E_OUT_OF_RANGE] start (%d) and end (%d) is out of range.", start, end - 1);
+                        "[%s] start (%d) and end (%d) is out of range.", GetErrorMessage(E_OUT_OF_RANGE), start, end - 1);
 
        r = SetCursorPosition(start);
        SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
 
        r = __pEdit->BeginTextBlock();
        SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, E_SYSTEM,
-                    "[E_SYSTEM] A system error has occurred. Failed to set text block range.");
+                        "[%s] A system error has occurred. Failed to set text block range.", GetErrorMessage(E_SYSTEM));
 
        r = SetCursorPosition(end);
        SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, E_SYSTEM,
-                    "[E_SYSTEM] A system error has occurred. Failed to set cursor position.");
+                        "[%s] A system error has occurred. Failed to set cursor position.", GetErrorMessage(E_SYSTEM));
 
        return E_SUCCESS;
 }
@@ -1082,8 +1086,8 @@ _SearchBar::SetBlockRange(int start, int end)
 result
 _SearchBar::RemoveTextBlock(void)
 {
-       SysTryReturn(NID_UI_CTRL, __pEdit, E_SYSTEM, E_SYSTEM,
-                    "[E_SYSTEM] A system error has occurred. The edit instance is null.");
+       SysTryReturn(NID_UI_CTRL, __pEdit != null, E_SYSTEM, E_SYSTEM,
+                        "[%s] A system error has occurred. The _Edit instance is null.", GetErrorMessage(E_SYSTEM));
 
        result r = E_SUCCESS;
 
@@ -1153,8 +1157,8 @@ result
 _SearchBar::SetBackgroundBitmap(const Bitmap& bitmap)
 {
        Bitmap* pNewBitmap = _BitmapImpl::CloneN(bitmap);
-       SysTryReturn(NID_UI_CTRL, pNewBitmap, E_SYSTEM, E_SYSTEM,
-                    "[E_SYSTEM] A system error has occurred. The creation of bitmap failed.");
+       SysTryReturn(NID_UI_CTRL, pNewBitmap != null, E_SYSTEM, E_SYSTEM,
+                        "[%s] A system error has occurred. The creation of bitmap failed.", GetErrorMessage(E_SYSTEM));
 
        delete __pBackgroundBitmap;
        __pBackgroundBitmap = null;
@@ -1227,8 +1231,8 @@ _SearchBar::SetSearchFieldTextColor(SearchFieldStatus status, const Color& color
 String
 _SearchBar::GetGuideText(void) const
 {
-       SysTryReturn(NID_UI_CTRL, __pEdit, String(), E_SYSTEM,
-                    "[E_SYSTEM] A system error has occurred. The edit instance is null.");
+       SysTryReturn(NID_UI_CTRL, __pEdit != null, String(), E_SYSTEM,
+                        "[%s] A system error has occurred. The _Edit instance is null.", GetErrorMessage(E_SYSTEM));
 
        return __pEdit->GetGuideText();
 }
@@ -1236,8 +1240,8 @@ _SearchBar::GetGuideText(void) const
 result
 _SearchBar::SetGuideText(const String& guideText)
 {
-       SysTryReturn(NID_UI_CTRL, __pEdit, E_SYSTEM, E_SYSTEM,
-                    "[E_SYSTEM] A system error has occurred. The edit instance is null.");
+       SysTryReturn(NID_UI_CTRL, __pEdit != null, E_SYSTEM, E_SYSTEM,
+                        "[%s] A system error has occurred. The _Edit instance is null.", GetErrorMessage(E_SYSTEM));
 
        __pEdit->SetGuideText(guideText);
 
@@ -1247,8 +1251,8 @@ _SearchBar::SetGuideText(const String& guideText)
 Color
 _SearchBar::GetGuideTextColor(void) const
 {
-       SysTryReturn(NID_UI_CTRL, __pEdit, E_SYSTEM, E_SYSTEM,
-                    "[E_SYSTEM] A system error has occurred. The edit instance is null.");
+       SysTryReturn(NID_UI_CTRL, __pEdit != null, E_SYSTEM, E_SYSTEM,
+                        "[%s] A system error has occurred. The _Edit instance is null.", GetErrorMessage(E_SYSTEM));
 
        return __pEdit->GetGuideTextColor();
 }
@@ -1256,8 +1260,8 @@ _SearchBar::GetGuideTextColor(void) const
 result
 _SearchBar::SetGuideTextColor(const Color& color)
 {
-       SysTryReturn(NID_UI_CTRL, __pEdit, E_SYSTEM, E_SYSTEM,
-                    "[E_SYSTEM] A system error has occurred. The edit instance is null.");
+       SysTryReturn(NID_UI_CTRL, __pEdit != null, E_SYSTEM, E_SYSTEM,
+                        "[%s] A system error has occurred. The _Edit instance is null.", GetErrorMessage(E_SYSTEM));
 
        __isUserGuideTextColor = true;
        return __pEdit->SetGuideTextColor(color);
@@ -1266,8 +1270,8 @@ _SearchBar::SetGuideTextColor(const Color& color)
 int
 _SearchBar::GetCursorPosition(void) const
 {
-       SysTryReturn(NID_UI_CTRL, __pEdit, -1, E_SYSTEM,
-                    "[E_SYSTEM] A system error has occurred. The edit instance is null.");
+       SysTryReturn(NID_UI_CTRL, __pEdit != null, -1, E_SYSTEM,
+                        "[%s] A system error has occurred. The _Edit instance is null.", GetErrorMessage(E_SYSTEM));
 
        return __pEdit->GetCursorPosition();
 }
@@ -1275,16 +1279,16 @@ _SearchBar::GetCursorPosition(void) const
 result
 _SearchBar::SetCursorPosition(int index)
 {
-       SysTryReturn(NID_UI_CTRL, __pEdit, E_SYSTEM, E_SYSTEM,
-                    "[E_SYSTEM] A system error has occurred. The edit instance is null.");
+       SysTryReturn(NID_UI_CTRL, __pEdit != null, E_SYSTEM, E_SYSTEM,
+                        "[%s] A system error has occurred. The _Edit instance is null.", GetErrorMessage(E_SYSTEM));
        SysTryReturn(NID_UI_CTRL, index > -1, E_OUT_OF_RANGE, E_OUT_OF_RANGE,
-                    "[E_OUT_OF_RANGE] index(%d) is out of range.", GetErrorMessage(E_OUT_OF_RANGE), index);
+                        "[%s] index(%d) is out of range.", GetErrorMessage(E_OUT_OF_RANGE), index);
 
        int textLength = -1;
        textLength = __pEdit->GetTextLength();
 
        SysTryReturn(NID_UI_CTRL, (index > -1 && index <= textLength), E_OUT_OF_RANGE, E_OUT_OF_RANGE,
-                    "[E_OUT_OF_RANGE] index(%d) is out of range.", index);
+                        "[%s] index(%d) is out of range.", GetErrorMessage(E_OUT_OF_RANGE), index);
 
        return __pEdit->SetCursorPosition(index);
 }
@@ -1292,8 +1296,8 @@ _SearchBar::SetCursorPosition(int index)
 bool
 _SearchBar::IsLowerCaseModeEnabled(void) const
 {
-       SysTryReturn(NID_UI_CTRL, __pEdit, E_SYSTEM, E_SYSTEM,
-                    "[E_SYSTEM] A system error has occurred. The edit instance is null.");
+       SysTryReturn(NID_UI_CTRL, __pEdit != null, E_SYSTEM, E_SYSTEM,
+                        "[%s] A system error has occurred. The _Edit instance is null.", GetErrorMessage(E_SYSTEM));
 
        return __pEdit->IsLowerCaseModeEnabled();
 }
@@ -1301,8 +1305,8 @@ _SearchBar::IsLowerCaseModeEnabled(void) const
 void
 _SearchBar::SetLowerCaseModeEnabled(bool enable)
 {
-       SysTryReturnVoidResult(NID_UI_CTRL, __pEdit, E_SYSTEM,
-                              "[E_SYSTEM] A system error has occurred. The edit instance is null.");
+       SysTryReturnVoidResult(NID_UI_CTRL, __pEdit != null, E_SYSTEM,
+                                  "[%s] A system error has occurred. The _Edit instance is null.", GetErrorMessage(E_SYSTEM));
 
        __pEdit->SetLowerCaseModeEnabled(enable);
 }
@@ -1310,8 +1314,8 @@ _SearchBar::SetLowerCaseModeEnabled(bool enable)
 EllipsisPosition
 _SearchBar::GetEllipsisPosition(void) const
 {
-       SysTryReturn(NID_UI_CTRL, __pEdit, ELLIPSIS_POSITION_START, E_SYSTEM,
-                    "[E_SYSTEM] A system error has occurred. The edit instance is null.");
+       SysTryReturn(NID_UI_CTRL, __pEdit != null, ELLIPSIS_POSITION_START, E_SYSTEM,
+                        "[%s] A system error has occurred. The _Edit instance is null.", GetErrorMessage(E_SYSTEM));
 
        return __pEdit->GetEllipsisPosition();
 }
@@ -1319,8 +1323,8 @@ _SearchBar::GetEllipsisPosition(void) const
 result
 _SearchBar::SetEllipsisPosition(EllipsisPosition position)
 {
-       SysTryReturn(NID_UI_CTRL, __pEdit, E_SYSTEM, E_SYSTEM,
-                    "[E_SYSTEM] A system error has occurred. The edit instance is null.");
+       SysTryReturn(NID_UI_CTRL, __pEdit != null, E_SYSTEM, E_SYSTEM,
+                        "[%s] A system error has occurred. The _Edit instance is null.", GetErrorMessage(E_SYSTEM));
        __pEdit->SetEllipsisPosition(position);
 
        return E_SUCCESS;
@@ -1335,16 +1339,16 @@ _SearchBar::GetKeypadAction(void) const
 bool
 _SearchBar::IsTextPredictionEnabled(void) const
 {
-       SysTryReturn(NID_UI_CTRL, __pEdit, false, E_SYSTEM,
-                    "[E_SYSTEM] A system error has occurred. The edit instance is null.");
+       SysTryReturn(NID_UI_CTRL, __pEdit != null, false, E_SYSTEM,
+                        "[%s] A system error has occurred. The _Edit instance is null.", GetErrorMessage(E_SYSTEM));
        return __pEdit->IsTextPredictionEnabled();
 }
 
 result
 _SearchBar::SetTextPredictionEnabled(bool enable)
 {
-       SysTryReturn(NID_UI_CTRL, __pEdit, E_SYSTEM, E_SYSTEM,
-                    "[E_SYSTEM] A system error has occurred. The edit instance is null.");
+       SysTryReturn(NID_UI_CTRL, __pEdit != null, E_SYSTEM, E_SYSTEM,
+                        "[%s] A system error has occurred. The _Edit instance is null.", GetErrorMessage(E_SYSTEM));
        return __pEdit->SetTextPredictionEnabled(enable);
 }
 
@@ -1380,8 +1384,8 @@ _SearchBar::AddActionEventListener(const _IActionEventListener& listener)
 result
 _SearchBar::RemoveActionEventListener(const _IActionEventListener& listener)
 {
-       SysTryReturn(NID_UI_CTRL, __pActionEvent, E_SYSTEM, E_SYSTEM,
-                    "[E_SYSTEM] A system error has occurred. The action event instance is null.");
+       SysTryReturn(NID_UI_CTRL, __pActionEvent != null, E_SYSTEM, E_SYSTEM,
+                        "[%s] A system error has occurred. The action event instance is null.", GetErrorMessage(E_SYSTEM));
        result r = E_SUCCESS;
 
        r = __pActionEvent->RemoveListener(listener);
@@ -1411,8 +1415,8 @@ _SearchBar::AddKeypadEventListener(const _IKeypadEventListener& listener)
 result
 _SearchBar::RemoveKeypadEventListener(const _IKeypadEventListener& listener)
 {
-       SysTryReturn(NID_UI_CTRL, __pKeypadEvent, E_SYSTEM, E_SYSTEM,
-                    "[E_SYSTEM] A system error has occurred. The keypad event instance is null.");
+       SysTryReturn(NID_UI_CTRL, __pKeypadEvent != null, E_SYSTEM, E_SYSTEM,
+                        "[%s] A system error has occurred. The keypad event instance is null.", GetErrorMessage(E_SYSTEM));
        result r = E_SUCCESS;
 
        r = __pKeypadEvent->RemoveListener(listener);
@@ -1443,8 +1447,8 @@ _SearchBar::AddTextBlockEventListener(const _ITextBlockEventListener& listener)
 result
 _SearchBar::RemoveTextBlockEventListener(const _ITextBlockEventListener& listener)
 {
-       SysTryReturn(NID_UI_CTRL, __pTextBlockEvent, E_SYSTEM, E_SYSTEM,
-                    "[E_SYSTEM] A system error has occurred. The text block event instance is null.");
+       SysTryReturn(NID_UI_CTRL, __pTextBlockEvent != null, E_SYSTEM, E_SYSTEM,
+                        "[%s] A system error has occurred. The text block event instance is null.", GetErrorMessage(E_SYSTEM));
        result r = E_SUCCESS;
 
        r = __pTextBlockEvent->RemoveListener(listener);
@@ -1475,8 +1479,8 @@ _SearchBar::AddTextEventListener(const _ITextEventListener& listener)
 result
 _SearchBar::RemoveTextEventListener(const _ITextEventListener& listener)
 {
-       SysTryReturn(NID_UI_CTRL, __pTextEvent, E_SYSTEM, E_SYSTEM,
-                    "[E_SYSTEM] A system error has occurred. The text event instance is null.");
+       SysTryReturn(NID_UI_CTRL, __pTextEvent != null, E_SYSTEM, E_SYSTEM,
+                        "[%s] A system error has occurred. The text event instance is null.", GetErrorMessage(E_SYSTEM));
        result r = E_SUCCESS;
 
        r = __pTextEvent->RemoveListener(listener);
@@ -1506,8 +1510,8 @@ _SearchBar::AddSearchBarEventListener(const _ISearchBarEventListener& listener)
 result
 _SearchBar::RemoveSearchBarEventListener(const _ISearchBarEventListener& listener)
 {
-       SysTryReturn(NID_UI_CTRL, __pSearchBarEvent, E_SYSTEM, E_SYSTEM,
-                    "[E_SYSTEM] A system error has occurred. The searchbar event instance is null.");
+       SysTryReturn(NID_UI_CTRL, __pSearchBarEvent != null, E_SYSTEM, E_SYSTEM,
+                        "[%s] A system error has occurred. The searchbar event instance is null.", GetErrorMessage(E_SYSTEM));
        result r = E_SUCCESS;
 
        r = __pSearchBarEvent->RemoveListener(listener);
@@ -1537,7 +1541,7 @@ _SearchBar::AddLanguageEventListener(const _ILanguageEventListener& listener)
 result
 _SearchBar::RemoveLanguageEventListener(const _ILanguageEventListener& listener)
 {
-       SysTryReturn(NID_UI_CTRL, __pLanguageEvent, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] This instance isn't constructed.");
+       SysTryReturn(NID_UI_CTRL, __pLanguageEvent != null, E_SYSTEM, E_SYSTEM, "[%s] This instance isn't constructed.", GetErrorMessage(E_SYSTEM));
        result r = E_SUCCESS;
 
        __pLanguageEvent->RemoveListener(listener);
@@ -1654,7 +1658,7 @@ _SearchBar::FireButtonActionEvent(const _Control &source, int actionId)
                {
                        IEventArg* pEventArg = _ActionEvent::CreateActionEventArgN(__actionId);
                        result r = GetLastResult();
-                       SysTryReturnVoidResult(NID_UI_CTRL, pEventArg, r, "[%s] Propagating.", GetErrorMessage(r));
+                       SysTryReturnVoidResult(NID_UI_CTRL, pEventArg != null, r, "[%s] Propagating.", GetErrorMessage(r));
 
                        __pActionEvent->Fire(*pEventArg);
                }
@@ -1679,7 +1683,7 @@ _SearchBar::OnKeypadWillOpen(void)
                {
                        IEventArg* pEventArg = _KeypadEvent::CreateKeypadEventArgN(CORE_KEYPAD_ACTION_SEARCH, CORE_KEYPAD_EVENT_STATUS_CREATED);
                        result r = GetLastResult();
-                       SysTryReturnVoidResult(NID_UI_CTRL, pEventArg, r, "[%s] Propagating.", GetErrorMessage(r));
+                       SysTryReturnVoidResult(NID_UI_CTRL, pEventArg != null, r, "[%s] Propagating.", GetErrorMessage(r));
 
                        __pKeypadEvent->Fire(*pEventArg);
                }
@@ -1696,7 +1700,7 @@ _SearchBar::OnKeypadOpened(void)
        {
                IEventArg* pEventArg = _KeypadEvent::CreateKeypadEventArgN(CORE_KEYPAD_ACTION_SEARCH, CORE_KEYPAD_EVENT_STATUS_OPEN);
                result r = GetLastResult();
-               SysTryReturnVoidResult(NID_UI_CTRL, pEventArg, r, "[%s] Propagating.", GetErrorMessage(r));
+               SysTryReturnVoidResult(NID_UI_CTRL, pEventArg != null, r, "[%s] Propagating.", GetErrorMessage(r));
 
                __pKeypadEvent->Fire(*pEventArg);
        }
@@ -1713,7 +1717,7 @@ _SearchBar::OnKeypadClosed(void)
        {
                IEventArg* pEventArg = _KeypadEvent::CreateKeypadEventArgN(CORE_KEYPAD_ACTION_SEARCH, CORE_KEYPAD_EVENT_STATUS_CLOSE);
                result r = GetLastResult();
-               SysTryReturnVoidResult(NID_UI_CTRL, pEventArg, r, "[%s] Propagating.", GetErrorMessage(r));
+               SysTryReturnVoidResult(NID_UI_CTRL, pEventArg != null, r, "[%s] Propagating.", GetErrorMessage(r));
 
                __pKeypadEvent->Fire(*pEventArg);
        }
@@ -1731,7 +1735,7 @@ _SearchBar::OnKeypadBoundsChanged(void)
        {
                IEventArg* pEventArg = _KeypadEvent::CreateKeypadEventArgN(CORE_KEYPAD_ACTION_SEARCH, CORE_KEYPAD_EVENT_STATUS_BOUNDS_CHANGED);
                result r = GetLastResult();
-               SysTryReturnVoidResult(NID_UI_CTRL, pEventArg, r, "[%s] Propagating.", GetErrorMessage(r));
+               SysTryReturnVoidResult(NID_UI_CTRL, pEventArg != null, r, "[%s] Propagating.", GetErrorMessage(r));
 
                __pKeypadEvent->Fire(*pEventArg);
        }
@@ -1747,7 +1751,7 @@ _SearchBar::OnKeypadActionPerformed(CoreKeypadAction keypadAction)
        {
                IEventArg* pEventArg = _KeypadEvent::CreateKeypadEventArgN(keypadAction, CORE_KEYPAD_EVENT_STATUS_ENTERACTION);
                result r = GetLastResult();
-               SysTryReturnVoidResult(NID_UI_CTRL, pEventArg, r, "[%s] Propagating.", GetErrorMessage(r));
+               SysTryReturnVoidResult(NID_UI_CTRL, pEventArg != null, r, "[%s] Propagating.", GetErrorMessage(r));
 
                __pKeypadEvent->Fire(*pEventArg);
        }
@@ -1762,7 +1766,7 @@ _SearchBar::OnTextBlockSelected(_Control& source, int start, int end)
        {
                IEventArg* pEventArg = _TextBlockEvent::CreateTextBlockEventArgN(start, end);
                result r = GetLastResult();
-               SysTryReturnVoidResult(NID_UI_CTRL, pEventArg, r, "[%s] Propagating.", GetErrorMessage(r));
+               SysTryReturnVoidResult(NID_UI_CTRL, pEventArg != null, r, "[%s] Propagating.", GetErrorMessage(r));
 
                __pTextBlockEvent->Fire(*pEventArg);
        }
@@ -1785,7 +1789,7 @@ _SearchBar::OnTextValueChanged(const _Control& source)
                {
                        IEventArg* pEventArg = _TextEvent::CreateTextEventArgN(CORE_TEXT_EVENT_CHANGED);
                        result r = GetLastResult();
-                       SysTryReturnVoidResult(NID_UI_CTRL, pEventArg, r, "[%s] Propagating.", GetErrorMessage(r));
+                       SysTryReturnVoidResult(NID_UI_CTRL, pEventArg != null, r, "[%s] Propagating.", GetErrorMessage(r));
 
                        __pTextEvent->Fire(*pEventArg);
                }
@@ -1800,7 +1804,7 @@ _SearchBar::OnTextValueChangeCanceled(const _Control& source)
        {
                IEventArg* pEventArg = _TextEvent::CreateTextEventArgN(CORE_TEXT_EVENT_CANCELED);
                result r = GetLastResult();
-               SysTryReturnVoidResult(NID_UI_CTRL, pEventArg, r, "[%s] Propagating.", GetErrorMessage(r));
+               SysTryReturnVoidResult(NID_UI_CTRL, pEventArg != null, r, "[%s] Propagating.", GetErrorMessage(r));
 
                __pTextEvent->Fire(*pEventArg);
        }
@@ -2137,7 +2141,7 @@ _SearchBar::SendSearchBarEvent(_SearchBarEventStatus status)
        {
                IEventArg* pEventArg = _SearchBarEvent::CreateSearchBarEventArgN(status);
                r = GetLastResult();
-               SysTryReturn(NID_UI_CTRL, pEventArg, r, r, "[%s] Propagating.", GetErrorMessage(r));
+               SysTryReturn(NID_UI_CTRL, pEventArg != null, r, r, "[%s] Propagating.", GetErrorMessage(r));
 
                if (!IsContentAreaVisible())
                {
@@ -2163,10 +2167,10 @@ _SearchBar::SetHeaderVisibleState(bool visible)
 result
 _SearchBar::SetPropertyButtonActionId(const Variant& actionId)
 {
-       SysTryReturn(NID_UI_CTRL, __pCancelButton, E_SYSTEM, E_SYSTEM,
-                    "[E_SYSTEM] A system error has occurred. The cancel button instance is null.");
+       SysTryReturn(NID_UI_CTRL, __pCancelButton != null, E_SYSTEM, E_SYSTEM,
+                        "[%s] A system error has occurred. The _Button instance is null.", GetErrorMessage(E_SYSTEM));
        SysTryReturn(NID_UI_CTRL, actionId.ToInt() > -1, E_INVALID_ARG, E_INVALID_ARG,
-                    "[E_INVALID_ARG] Invalid argument(s) is used. actionId.ToInt() = %d", actionId.ToInt());
+                        "[%s] Invalid argument(s) is used. actionId.ToInt() = %d", GetErrorMessage(E_INVALID_ARG), actionId.ToInt());
 
        result r = E_SUCCESS;
 
@@ -2182,8 +2186,8 @@ _SearchBar::SetPropertyButtonActionId(const Variant& actionId)
 Variant
 _SearchBar::GetPropertyButtonActionId(void) const
 {
-       SysTryReturn(NID_UI_CTRL, __pCancelButton, Variant(-1), E_SYSTEM,
-                    "[E_SYSTEM] A system error has occurred. The cancel button instance is null.");
+       SysTryReturn(NID_UI_CTRL, __pCancelButton != null, Variant(-1), E_SYSTEM,
+                        "[%s] A system error has occurred. The _Button instance is null.", GetErrorMessage(E_SYSTEM));
 
        return Variant(__actionId);
 }
@@ -2191,14 +2195,14 @@ _SearchBar::GetPropertyButtonActionId(void) const
 result
 _SearchBar::SetPropertyButtonDisabledColor(const Variant& color)
 {
-       SysTryReturn(NID_UI_CTRL, __pCancelButton, E_SYSTEM, E_SYSTEM,
-                    "[E_SYSTEM] A system error has occurred. The cancel button instance is null.");
+       SysTryReturn(NID_UI_CTRL, __pCancelButton != null, E_SYSTEM, E_SYSTEM,
+                        "[%s] A system error has occurred. The _Button instance is null.", GetErrorMessage(E_SYSTEM));
 
        result r = E_SUCCESS;
 
        r = __pCancelButton->SetPropertyDisabledColor(color);
        SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, E_SYSTEM,
-                    "[E_SYSTEM] A system error has occurred. Failed to set button color.");
+                        "[%s] A system error has occurred. Failed to set button color.", GetErrorMessage(E_SYSTEM));
 
        __buttonColor[SEARCH_BAR_BUTTON_STATUS_DISABLED] = color.ToColor();
 
@@ -2208,8 +2212,8 @@ _SearchBar::SetPropertyButtonDisabledColor(const Variant& color)
 Variant
 _SearchBar::GetPropertyButtonDisabledColor(void) const
 {
-       SysTryReturn(NID_UI_CTRL, __pCancelButton, Variant(Color()), E_SYSTEM,
-                    "[E_SYSTEM] A system error has occurred. The cancel button instance is null.");
+       SysTryReturn(NID_UI_CTRL, __pCancelButton != null, Variant(Color()), E_SYSTEM,
+                        "[%s] A system error has occurred. The _Button instance is null.", GetErrorMessage(E_SYSTEM));
 
        return Variant(__buttonColor[SEARCH_BAR_BUTTON_STATUS_DISABLED]);
 }
@@ -2217,14 +2221,14 @@ _SearchBar::GetPropertyButtonDisabledColor(void) const
 result
 _SearchBar::SetPropertyButtonHighlightedColor(const Variant& color)
 {
-       SysTryReturn(NID_UI_CTRL, __pCancelButton, E_SYSTEM, E_SYSTEM,
-                    "[E_SYSTEM] A system error has occurred. The cancel button instance is null.");
+       SysTryReturn(NID_UI_CTRL, __pCancelButton != null, E_SYSTEM, E_SYSTEM,
+                        "[%s] A system error has occurred. The _Button instance is null.", GetErrorMessage(E_SYSTEM));
 
        result r = E_SUCCESS;
 
        r = __pCancelButton->SetPropertyHighlightedColor(color);
        SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, E_SYSTEM,
-                    "[E_SYSTEM] A system error has occurred. Failed to set button color.");
+                        "[%s] A system error has occurred. Failed to set button color.", GetErrorMessage(E_SYSTEM));
 
        __buttonColor[SEARCH_BAR_BUTTON_STATUS_HIGHLIGHTED] = color.ToColor();
 
@@ -2234,8 +2238,8 @@ _SearchBar::SetPropertyButtonHighlightedColor(const Variant& color)
 Variant
 _SearchBar::GetPropertyButtonHighlightedColor(void) const
 {
-       SysTryReturn(NID_UI_CTRL, __pCancelButton, Variant(Color()), E_SYSTEM,
-                    "[E_SYSTEM] A system error has occurred. The cancel button instance is null.");
+       SysTryReturn(NID_UI_CTRL, __pCancelButton != null, Variant(Color()), E_SYSTEM,
+                        "[%s] A system error has occurred. The _Button instance is null.", GetErrorMessage(E_SYSTEM));
 
        return Variant(__buttonColor[SEARCH_BAR_BUTTON_STATUS_HIGHLIGHTED]);
 }
@@ -2243,14 +2247,14 @@ _SearchBar::GetPropertyButtonHighlightedColor(void) const
 result
 _SearchBar::SetPropertyButtonNormalColor(const Variant& color)
 {
-       SysTryReturn(NID_UI_CTRL, __pCancelButton, E_SYSTEM, E_SYSTEM,
-                    "[E_SYSTEM] A system error has occurred. The cancel button instance is null.");
+       SysTryReturn(NID_UI_CTRL, __pCancelButton != null, E_SYSTEM, E_SYSTEM,
+                        "[%s] A system error has occurred. The _Button instance is null.", GetErrorMessage(E_SYSTEM));
 
        result r = E_SUCCESS;
 
        r = __pCancelButton->SetPropertyNormalColor(color);
        SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, E_SYSTEM,
-                    "[E_SYSTEM] A system error has occurred. Failed to set button color.");
+                        "[%s] A system error has occurred. Failed to set button color.", GetErrorMessage(E_SYSTEM));
 
        __buttonColor[SEARCH_BAR_BUTTON_STATUS_NORMAL] = color.ToColor();
 
@@ -2260,8 +2264,8 @@ _SearchBar::SetPropertyButtonNormalColor(const Variant& color)
 Variant
 _SearchBar::GetPropertyButtonNormalColor(void) const
 {
-       SysTryReturn(NID_UI_CTRL, __pCancelButton, Variant(Color()), E_SYSTEM,
-                    "[E_SYSTEM] A system error has occurred. The cancel button instance is null.");
+       SysTryReturn(NID_UI_CTRL, __pCancelButton != null, Variant(Color()), E_SYSTEM,
+                        "[%s] A system error has occurred. The _Button instance is null.", GetErrorMessage(E_SYSTEM));
 
        return Variant(__buttonColor[SEARCH_BAR_BUTTON_STATUS_NORMAL]);
 }
@@ -2269,14 +2273,14 @@ _SearchBar::GetPropertyButtonNormalColor(void) const
 result
 _SearchBar::SetPropertyButtonPressedColor(const Variant& color)
 {
-       SysTryReturn(NID_UI_CTRL, __pCancelButton, E_SYSTEM, E_SYSTEM,
-                    "[E_SYSTEM] A system error has occurred. The cancel button instance is null.");
+       SysTryReturn(NID_UI_CTRL, __pCancelButton != null, E_SYSTEM, E_SYSTEM,
+                        "[%s] A system error has occurred. The _Button instance is null.", GetErrorMessage(E_SYSTEM));
 
        result r = E_SUCCESS;
 
        r = __pCancelButton->SetPropertyPressedColor(color);
        SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, E_SYSTEM,
-                    "[E_SYSTEM] A system error has occurred. Failed to set button color.");
+                        "[%s] A system error has occurred. Failed to set button color.", GetErrorMessage(E_SYSTEM));
 
        __buttonColor[SEARCH_BAR_BUTTON_STATUS_PRESSED] = color.ToColor();
 
@@ -2286,8 +2290,8 @@ _SearchBar::SetPropertyButtonPressedColor(const Variant& color)
 Variant
 _SearchBar::GetPropertyButtonPressedColor(void) const
 {
-       SysTryReturn(NID_UI_CTRL, __pCancelButton, Variant(Color()), E_SYSTEM,
-                    "[E_SYSTEM] A system error has occurred. The cancel button instance is null.");
+       SysTryReturn(NID_UI_CTRL, __pCancelButton != null, Variant(Color()), E_SYSTEM,
+                        "[%s] A system error has occurred. The _Button instance is null.", GetErrorMessage(E_SYSTEM));
 
        return Variant(__buttonColor[SEARCH_BAR_BUTTON_STATUS_PRESSED]);
 }
@@ -2295,14 +2299,14 @@ _SearchBar::GetPropertyButtonPressedColor(void) const
 result
 _SearchBar::SetPropertyButtonDisabledTextColor(const Variant& textColor)
 {
-       SysTryReturn(NID_UI_CTRL, __pCancelButton, E_SYSTEM, E_SYSTEM,
-                    "[E_SYSTEM] A system error has occurred. The cancel button instance is null.");
+       SysTryReturn(NID_UI_CTRL, __pCancelButton != null, E_SYSTEM, E_SYSTEM,
+                        "[%s] A system error has occurred. The _Button instance is null.", GetErrorMessage(E_SYSTEM));
 
        result r = E_SUCCESS;
 
        r = __pCancelButton->SetPropertyDisabledTextColor(textColor);
        SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, E_SYSTEM,
-                    "[E_SYSTEM] A system error has occurred. Failed to set button text color.");
+                        "[%s] A system error has occurred. Failed to set button text color.", GetErrorMessage(E_SYSTEM));
 
        __buttonTextColor[SEARCH_BAR_BUTTON_STATUS_DISABLED] = textColor.ToColor();
 
@@ -2312,8 +2316,8 @@ _SearchBar::SetPropertyButtonDisabledTextColor(const Variant& textColor)
 Variant
 _SearchBar::GetPropertyButtonDisabledTextColor(void) const
 {
-       SysTryReturn(NID_UI_CTRL, __pCancelButton, Variant(Color()), E_SYSTEM,
-                    "[E_SYSTEM] A system error has occurred. The cancel button instance is null.");
+       SysTryReturn(NID_UI_CTRL, __pCancelButton != null, Variant(Color()), E_SYSTEM,
+                        "[%s] A system error has occurred. The _Button instance is null.", GetErrorMessage(E_SYSTEM));
 
        return Variant(__buttonTextColor[SEARCH_BAR_BUTTON_STATUS_DISABLED]);
 }
@@ -2321,14 +2325,14 @@ _SearchBar::GetPropertyButtonDisabledTextColor(void) const
 result
 _SearchBar::SetPropertyButtonHighlightedTextColor(const Variant& textColor)
 {
-       SysTryReturn(NID_UI_CTRL, __pCancelButton, E_SYSTEM, E_SYSTEM,
-                    "[E_SYSTEM]] A system error has occurred. The cancel button instance is null.");
+       SysTryReturn(NID_UI_CTRL, __pCancelButton != null, E_SYSTEM, E_SYSTEM,
+                        "[%s] A system error has occurred. The _Button instance is null.", GetErrorMessage(E_SYSTEM));
 
        result r = E_SUCCESS;
 
        r = __pCancelButton->SetPropertyHighlightedTextColor(textColor);
        SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, E_SYSTEM,
-                    "[E_SYSTEM] A system error has occurred. Failed to set button text color.");
+                        "[%s] A system error has occurred. Failed to set button text color.", GetErrorMessage(E_SYSTEM));
 
        __buttonTextColor[SEARCH_BAR_BUTTON_STATUS_HIGHLIGHTED] = textColor.ToColor();
 
@@ -2338,8 +2342,8 @@ _SearchBar::SetPropertyButtonHighlightedTextColor(const Variant& textColor)
 Variant
 _SearchBar::GetPropertyButtonHighlightedTextColor(void) const
 {
-       SysTryReturn(NID_UI_CTRL, __pCancelButton, Variant(Color()), E_SYSTEM,
-                    "[E_SYSTEM] A system error has occurred. The cancel button instance is null.");
+       SysTryReturn(NID_UI_CTRL, __pCancelButton != null, Variant(Color()), E_SYSTEM,
+                        "[%s] A system error has occurred. The _Button instance is null.", GetErrorMessage(E_SYSTEM));
 
        return Variant(__buttonTextColor[SEARCH_BAR_BUTTON_STATUS_HIGHLIGHTED]);
 }
@@ -2347,14 +2351,14 @@ _SearchBar::GetPropertyButtonHighlightedTextColor(void) const
 result
 _SearchBar::SetPropertyButtonNormalTextColor(const Variant& textColor)
 {
-       SysTryReturn(NID_UI_CTRL, __pCancelButton, E_SYSTEM, E_SYSTEM,
-                    "[E_SYSTEM] A system error has occurred. The cancel button instance is null.");
+       SysTryReturn(NID_UI_CTRL, __pCancelButton != null, E_SYSTEM, E_SYSTEM,
+                        "[%s] A system error has occurred. The _Button instance is null.", GetErrorMessage(E_SYSTEM));
 
        result r = E_SUCCESS;
 
        r = __pCancelButton->SetPropertyNormalTextColor(textColor);
        SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, E_SYSTEM,
-                    "[E_SYSTEM] A system error has occurred. Failed to set button text color.");
+                        "[%s] A system error has occurred. Failed to set button text color.", GetErrorMessage(E_SYSTEM));
 
        __buttonTextColor[SEARCH_BAR_BUTTON_STATUS_NORMAL] = textColor.ToColor();
 
@@ -2364,8 +2368,8 @@ _SearchBar::SetPropertyButtonNormalTextColor(const Variant& textColor)
 Variant
 _SearchBar::GetPropertyButtonNormalTextColor(void) const
 {
-       SysTryReturn(NID_UI_CTRL, __pCancelButton, Variant(Color()), E_SYSTEM,
-                    "[E_SYSTEM] A system error has occurred. The cancel button instance is null.");
+       SysTryReturn(NID_UI_CTRL, __pCancelButton != null, Variant(Color()), E_SYSTEM,
+                        "[%s] A system error has occurred. The _Button instance is null.", GetErrorMessage(E_SYSTEM));
 
        return Variant(__buttonTextColor[SEARCH_BAR_BUTTON_STATUS_NORMAL]);
 }
@@ -2373,14 +2377,14 @@ _SearchBar::GetPropertyButtonNormalTextColor(void) const
 result
 _SearchBar::SetPropertyButtonPressedTextColor(const Variant& textColor)
 {
-       SysTryReturn(NID_UI_CTRL, __pCancelButton, E_SYSTEM, E_SYSTEM,
-                    "[E_SYSTEM] A system error has occurred. The cancel button instance is null.");
+       SysTryReturn(NID_UI_CTRL, __pCancelButton != null, E_SYSTEM, E_SYSTEM,
+                        "[%s] A system error has occurred. The _Button instance is null.", GetErrorMessage(E_SYSTEM));
 
        result r = E_SUCCESS;
 
        r = __pCancelButton->SetPropertyPressedTextColor(textColor);
        SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, E_SYSTEM,
-                    "[E_SYSTEM] A system error has occurred. Failed to set button text color.");
+                        "[%s] A system error has occurred. Failed to set button text color.", GetErrorMessage(E_SYSTEM));
 
        __buttonTextColor[SEARCH_BAR_BUTTON_STATUS_PRESSED] = textColor.ToColor();
 
@@ -2390,8 +2394,8 @@ _SearchBar::SetPropertyButtonPressedTextColor(const Variant& textColor)
 Variant
 _SearchBar::GetPropertyButtonPressedTextColor(void) const
 {
-       SysTryReturn(NID_UI_CTRL, __pCancelButton, Variant(Color()), E_SYSTEM,
-                    "[E_SYSTEM] A system error has occurred. The cancel button instance is null.");
+       SysTryReturn(NID_UI_CTRL, __pCancelButton != null, Variant(Color()), E_SYSTEM,
+                        "[%s] A system error has occurred. The _Button instance is null.", GetErrorMessage(E_SYSTEM));
 
        return Variant(__buttonTextColor[SEARCH_BAR_BUTTON_STATUS_PRESSED]);
 }
@@ -2399,14 +2403,14 @@ _SearchBar::GetPropertyButtonPressedTextColor(void) const
 result
 _SearchBar::SetPropertySearchFieldDisabledColor(const Variant& color)
 {
-       SysTryReturn(NID_UI_CTRL, __pEdit, E_SYSTEM, E_SYSTEM,
-                    "[E_SYSTEM] A system error has occurred. The edit instance is null.");
+       SysTryReturn(NID_UI_CTRL, __pEdit != null, E_SYSTEM, E_SYSTEM,
+                        "[%s] A system error has occurred. The _Edit instance is null.", GetErrorMessage(E_SYSTEM));
 
        result r = E_SUCCESS;
 
        r = __pEdit->SetPropertyDisabledColor(color);
        SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, E_SYSTEM,
-                    "[E_SYSTEM] A system error has occurred. Failed to set the edit disabled color.");
+                        "[%s] A system error has occurred. Failed to set the edit disabled color.", GetErrorMessage(E_SYSTEM));
 
        __color[SEARCH_FIELD_STATUS_DISABLED] = color.ToColor();
 
@@ -2416,8 +2420,8 @@ _SearchBar::SetPropertySearchFieldDisabledColor(const Variant& color)
 Variant
 _SearchBar::GetPropertySearchFieldDisabledColor(void) const
 {
-       SysTryReturn(NID_UI_CTRL, __pEdit, Variant(Color()), E_SYSTEM,
-                    "[E_SYSTEM] A system error has occurred. The edit instance is null.");
+       SysTryReturn(NID_UI_CTRL, __pEdit != null, Variant(Color()), E_SYSTEM,
+                        "[%s] A system error has occurred. The _Edit instance is null.", GetErrorMessage(E_SYSTEM));
 
        return Variant(__color[SEARCH_FIELD_STATUS_DISABLED]);
 }
@@ -2425,14 +2429,14 @@ _SearchBar::GetPropertySearchFieldDisabledColor(void) const
 result
 _SearchBar::SetPropertySearchFieldHighlightedColor(const Variant& color)
 {
-       SysTryReturn(NID_UI_CTRL, __pEdit, E_SYSTEM, E_SYSTEM,
-                    "[E_SYSTEM] A system error has occurred. The edit instance is null.");
+       SysTryReturn(NID_UI_CTRL, __pEdit != null, E_SYSTEM, E_SYSTEM,
+                        "[%s] A system error has occurred. The _Edit instance is null.", GetErrorMessage(E_SYSTEM));
 
        result r = E_SUCCESS;
 
        r = __pEdit->SetPropertyHighlightedColor(color);
        SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, E_SYSTEM,
-                    "[E_SYSTEM] A system error has occurred. Failed to set the edit highlighted color.");
+                        "[%s] A system error has occurred. Failed to set the edit highlighted color.", GetErrorMessage(E_SYSTEM));
 
        __color[SEARCH_FIELD_STATUS_HIGHLIGHTED] = color.ToColor();
 
@@ -2442,8 +2446,8 @@ _SearchBar::SetPropertySearchFieldHighlightedColor(const Variant& color)
 Variant
 _SearchBar::GetPropertySearchFieldHighlightedColor(void) const
 {
-       SysTryReturn(NID_UI_CTRL, __pEdit, Variant(Color()), E_SYSTEM,
-                    "[E_SYSTEM] A system error has occurred. The edit instance is null.");
+       SysTryReturn(NID_UI_CTRL, __pEdit != null, Variant(Color()), E_SYSTEM,
+                        "[%s] A system error has occurred. The _Edit instance is null.", GetErrorMessage(E_SYSTEM));
 
        return Variant(__color[SEARCH_FIELD_STATUS_HIGHLIGHTED]);
 }
@@ -2451,14 +2455,14 @@ _SearchBar::GetPropertySearchFieldHighlightedColor(void) const
 result
 _SearchBar::SetPropertySearchFieldNormalColor(const Variant& color)
 {
-       SysTryReturn(NID_UI_CTRL, __pEdit, E_SYSTEM, E_SYSTEM,
-                    "[E_SYSTEM] A system error has occurred. The edit instance is null.");
+       SysTryReturn(NID_UI_CTRL, __pEdit != null, E_SYSTEM, E_SYSTEM,
+                        "[%s] A system error has occurred. The _Edit instance is null.", GetErrorMessage(E_SYSTEM));
 
        result r = E_SUCCESS;
 
        r = __pEdit->SetPropertyNormalColor(color);
        SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, E_SYSTEM,
-                    "[E_SYSTEM] A system error has occurred. Failed to set edit normal color.");
+                        "[%s] A system error has occurred. Failed to set edit normal color.", GetErrorMessage(E_SYSTEM));
 
        __color[SEARCH_FIELD_STATUS_NORMAL] = color.ToColor();
 
@@ -2468,8 +2472,8 @@ _SearchBar::SetPropertySearchFieldNormalColor(const Variant& color)
 Variant
 _SearchBar::GetPropertySearchFieldNormalColor(void) const
 {
-       SysTryReturn(NID_UI_CTRL, __pEdit, Variant(Color()), E_SYSTEM,
-                    "[E_SYSTEM] A system error has occurred. The edit instance is null.");
+       SysTryReturn(NID_UI_CTRL, __pEdit != null, Variant(Color()), E_SYSTEM,
+                        "[%s] A system error has occurred. The _Edit instance is null.", GetErrorMessage(E_SYSTEM));
 
        return Variant(__color[SEARCH_FIELD_STATUS_NORMAL]);
 }
@@ -2477,14 +2481,14 @@ _SearchBar::GetPropertySearchFieldNormalColor(void) const
 result
 _SearchBar::SetPropertySearchFieldDisabledTextColor(const Variant& textColor)
 {
-       SysTryReturn(NID_UI_CTRL, __pEdit, E_SYSTEM, E_SYSTEM,
-                    "[E_SYSTEM] A system error has occurred. The edit instance is null.");
+       SysTryReturn(NID_UI_CTRL, __pEdit != null, E_SYSTEM, E_SYSTEM,
+                        "[%s] A system error has occurred. The _Edit instance is null.", GetErrorMessage(E_SYSTEM));
 
        result r = E_SUCCESS;
 
        r = __pEdit->SetPropertyDisabledTextColor(textColor);
        SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, E_SYSTEM,
-                    "[E_SYSTEM] A system error has occurred. Failed to set edit disabled text color.");
+                        "[%s] A system error has occurred. Failed to set edit disabled text color.", GetErrorMessage(E_SYSTEM));
 
        __textColor[SEARCH_FIELD_STATUS_DISABLED] = textColor.ToColor();
 
@@ -2494,8 +2498,8 @@ _SearchBar::SetPropertySearchFieldDisabledTextColor(const Variant& textColor)
 Variant
 _SearchBar::GetPropertySearchFieldDisabledTextColor(void) const
 {
-       SysTryReturn(NID_UI_CTRL, __pEdit, Variant(Color()), E_SYSTEM,
-                    "[E_SYSTEM] A system error has occurred. The edit instance is null.");
+       SysTryReturn(NID_UI_CTRL, __pEdit != null, Variant(Color()), E_SYSTEM,
+                        "[%s] A system error has occurred. The _Edit instance is null.", GetErrorMessage(E_SYSTEM));
 
        return Variant(__textColor[SEARCH_FIELD_STATUS_DISABLED]);
 }
@@ -2503,14 +2507,14 @@ _SearchBar::GetPropertySearchFieldDisabledTextColor(void) const
 result
 _SearchBar::SetPropertySearchFieldHighlightedTextColor(const Variant& textColor)
 {
-       SysTryReturn(NID_UI_CTRL, __pEdit, E_SYSTEM, E_SYSTEM,
-                    "[E_SYSTEM] A system error has occurred. The edit instance is null.");
+       SysTryReturn(NID_UI_CTRL, __pEdit != null, E_SYSTEM, E_SYSTEM,
+                        "[%s] A system error has occurred. The _Edit instance is null.", GetErrorMessage(E_SYSTEM));
 
        result r = E_SUCCESS;
 
        r = __pEdit->SetPropertyHighlightedTextColor(textColor);
        SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, E_SYSTEM,
-                    "[E_SYSTEM] A system error has occurred. Failed to set edit highlighted text color.");
+                        "[%s] A system error has occurred. Failed to set edit highlighted text color.", GetErrorMessage(E_SYSTEM));
 
        __textColor[SEARCH_FIELD_STATUS_HIGHLIGHTED] = textColor.ToColor();
 
@@ -2520,8 +2524,8 @@ _SearchBar::SetPropertySearchFieldHighlightedTextColor(const Variant& textColor)
 Variant
 _SearchBar::GetPropertySearchFieldHighlightedTextColor(void) const
 {
-       SysTryReturn(NID_UI_CTRL, __pEdit, Variant(Color()), E_SYSTEM,
-                    "[E_SYSTEM] A system error has occurred. The edit instance is null.");
+       SysTryReturn(NID_UI_CTRL, __pEdit != null, Variant(Color()), E_SYSTEM,
+                        "[%s] A system error has occurred. The _Edit instance is null.", GetErrorMessage(E_SYSTEM));
 
        return Variant(__textColor[SEARCH_FIELD_STATUS_HIGHLIGHTED]);
 }
@@ -2529,14 +2533,14 @@ _SearchBar::GetPropertySearchFieldHighlightedTextColor(void) const
 result
 _SearchBar::SetPropertySearchFieldNormalTextColor(const Variant& textColor)
 {
-       SysTryReturn(NID_UI_CTRL, __pEdit, E_SYSTEM, E_SYSTEM,
-                    "[E_SYSTEM] A system error has occurred. The edit instance is null.");
+       SysTryReturn(NID_UI_CTRL, __pEdit != null, E_SYSTEM, E_SYSTEM,
+                        "[%s] A system error has occurred. The _Edit instance is null.", GetErrorMessage(E_SYSTEM));
 
        result r = E_SUCCESS;
 
        r = __pEdit->SetPropertyNormalTextColor(textColor);
        SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, E_SYSTEM,
-                    "[E_SYSTEM] A system error has occurred. Failed to set edit normal text color.");
+                        "[%s] A system error has occurred. Failed to set edit normal text color.", GetErrorMessage(E_SYSTEM));
 
        __textColor[SEARCH_FIELD_STATUS_NORMAL] = textColor.ToColor();
 
@@ -2546,8 +2550,8 @@ _SearchBar::SetPropertySearchFieldNormalTextColor(const Variant& textColor)
 Variant
 _SearchBar::GetPropertySearchFieldNormalTextColor(void) const
 {
-       SysTryReturn(NID_UI_CTRL, __pEdit, Variant(Color()), E_SYSTEM,
-                    "[E_SYSTEM] A system error has occurred. The edit instance is null.");
+       SysTryReturn(NID_UI_CTRL, __pEdit != null, Variant(Color()), E_SYSTEM,
+                        "[%s] A system error has occurred. The _Edit instance is null.", GetErrorMessage(E_SYSTEM));
 
        return Variant(__textColor[SEARCH_FIELD_STATUS_NORMAL]);
 }
@@ -2571,8 +2575,8 @@ _SearchBar::SetPropertyContentAreaSize(const Variant& size)
 {
        FloatDimension contentAreaSize = size.ToFloatDimension();
        SysTryReturn(NID_UI_CTRL, contentAreaSize.width >= 0 && contentAreaSize.height >= 0, E_INVALID_ARG, E_INVALID_ARG,
-                    "[E_INVALID_ARG] Invalid argument(s) is used. contentAreaSize.width = %f, contenAreaSize.height = %f",
-                    contentAreaSize.width, contentAreaSize.height);
+                        "[%s] Invalid argument(s) is used. contentAreaSize.width = %f, contenAreaSize.height = %f",
+                        GetErrorMessage(E_INVALID_ARG), contentAreaSize.width, contentAreaSize.height);
 
        result r = E_SUCCESS;
 
@@ -2868,8 +2872,8 @@ _SearchBar::GetCurrentStatus(void)
 void
 _SearchBar::SetEditTextFilter(IEditTextFilter* pFilter)
 {
-       SysTryReturnVoidResult(NID_UI_CTRL, __pEdit, E_SYSTEM,
-                              "[E_SYSTEM] A system error has occurred. The edit instance is null.");
+       SysTryReturnVoidResult(NID_UI_CTRL, __pEdit != null, E_SYSTEM,
+                                  "[%s] A system error has occurred. The _Edit instance is null.", GetErrorMessage(E_SYSTEM));
 
        __pEdit->SetEditTextFilter(pFilter);
 
@@ -2879,8 +2883,8 @@ _SearchBar::SetEditTextFilter(IEditTextFilter* pFilter)
 void
 _SearchBar::SendOpaqueCommand(const String& command)
 {
-       SysTryReturnVoidResult(NID_UI_CTRL, __pEdit, E_SYSTEM,
-                              "[E_SYSTEM] A system error has occurred. The edit instance is null.");
+       SysTryReturnVoidResult(NID_UI_CTRL, __pEdit != null, E_SYSTEM,
+                                  "[E_SYSTEM] A system error has occurred. The _Edit instance is null.");
 
        __pEdit->SendOpaqueCommand(command);
 
index 73ba9d3..c32336e 100644 (file)
@@ -122,8 +122,8 @@ _SearchBarEvent*
 _SearchBarEvent::CreateInstanceN(const _SearchBar& source)
 {
        _SearchBarEvent* pSearchBarEvent = new (std::nothrow) _SearchBarEvent(source);
-       SysTryReturn(NID_UI_CTRL, pSearchBarEvent, null, E_OUT_OF_MEMORY,
-                    "[E_OUT_OF_MEMORY] Memory allocation failed.");
+       SysTryReturn(NID_UI_CTRL, pSearchBarEvent != null, null, E_OUT_OF_MEMORY,
+                        "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
 
        if (IsFailed(GetLastResult()))
        {
@@ -155,17 +155,17 @@ _SearchBarEvent::FireImpl(Tizen::Base::Runtime::IEventListener& listener, const
        // cast to _IActionEventListener
        _ISearchBarEventListener* pSearchBarListener = dynamic_cast <_ISearchBarEventListener*>(&listener);
        SysTryReturnVoidResult(NID_UI_CTRL, pSearchBarListener != null, E_INVALID_ARG,
-                              "[E_INVALID_ARG] Invalid argument(s) is used. The searchbar listener instance is null.");
+                                  "[%s] Invalid argument(s) is used. The searchbar listener instance is null.", GetErrorMessage(E_INVALID_ARG));
 
        // cast to _SearchBarEventArg
        const _SearchBarEventArg* pArg = dynamic_cast <const _SearchBarEventArg*>(&arg);
        SysTryReturnVoidResult(NID_UI_CTRL, pArg != null, E_INVALID_ARG,
-                              "[E_INVALID_ARG] Invalid argument(s) is used. The argument to searchbar event listener is null.");
+                                  "[%s] Invalid argument(s) is used. The argument to searchbar event listener is null.", GetErrorMessage(E_INVALID_ARG));
 
        _SearchBar* pSource = null;
        pSource = const_cast <_SearchBar*>(__pSource);
        SysTryReturnVoidResult(NID_UI_CTRL, pSource != null, E_INVALID_ARG,
-                              "[E_INVALID_ARG] Invalid argument(s) is used.The searchbar instance is null.");
+                                  "[%s] Invalid argument(s) is used.The searchbar instance is null.", GetErrorMessage(E_INVALID_ARG));
 
        // call cursor change event listener method
        _SearchBarEventStatus status = pArg->GetStatus();
@@ -183,8 +183,8 @@ IEventArg*
 _SearchBarEvent::CreateSearchBarEventArgN(_SearchBarEventStatus status)
 {
        _SearchBarEventArg* pEventArg = new (std::nothrow) _SearchBarEventArg(status);
-       SysTryReturn(NID_UI_CTRL, pEventArg, null, E_OUT_OF_MEMORY,
-                    "[E_OUT_OF_MEMORY] Memory allocation failed.");
+       SysTryReturn(NID_UI_CTRL, pEventArg != null, null, E_OUT_OF_MEMORY,
+                        "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
 
        return pEventArg;
 }
index f32e051..e1be7aa 100644 (file)
  * @brief      This is the implementation file for _SearchBarImpl class.
  */
 
-#include <FApp_AppInfo.h>
 #include <FBaseSysLog.h>
-#include <FBase_LocalizedNumParser.h>
 #include <FLclLocale.h>
 #include <FUiAccessibilityContainer.h>
 #include <FUiAccessibilityElement.h>
+#include <FBase_LocalizedNumParser.h>
+#include <FApp_AppInfo.h>
 #include "FUi_ResourceSizeInfo.h"
 #include "FUi_ResourceManager.h"
 #include "FUi_UiBuilder.h"
+#include "FUi_CoordinateSystemUtils.h"
 #include "FUiCtrl_PublicActionEvent.h"
 #include "FUiCtrl_PublicTextBlockEvent.h"
 #include "FUiCtrl_PublicTextEvent.h"
 #include "FUiCtrl_SearchBarImpl.h"
-#include "FUi_CoordinateSystemUtils.h"
 #include "FUiCtrl_EditFieldImpl.h"
 #include "FUiCtrl_ButtonImpl.h"
 
@@ -112,7 +112,7 @@ _SearchBarImpl::CreateSearchBarImplN(SearchBar* pControl, const Rectangle& bound
 
        r = GET_SIZE_INFO(SearchBar).CheckInitialSizeValid(Dimension(bounds.width, bounds.height), _CONTROL_ORIENTATION_PORTRAIT);
        SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, E_INVALID_ARG,
-                    "[E_INVALID_ARG] Invalid argument(s) is used. The given size is not valid.");
+                        "[%s] Invalid argument(s) is used. The given size is not valid.", GetErrorMessage(E_INVALID_ARG));
 
        _SearchBar* pCore = _SearchBar::CreateSearchBarN();
        r = GetLastResult();
@@ -143,7 +143,7 @@ _SearchBarImpl::CreateSearchBarImplFN(SearchBar* pControl, const FloatRectangle&
 
        r = GET_SIZE_INFO(SearchBar).CheckInitialSizeValidF(FloatDimension(bounds.width, bounds.height), _CONTROL_ORIENTATION_PORTRAIT);
        SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, E_INVALID_ARG,
-                    "[E_INVALID_ARG] Invalid argument(s) is used. The given size is not valid.");
+                        "[%s] Invalid argument(s) is used. The given size is not valid.", GetErrorMessage(E_INVALID_ARG));
 
        _SearchBar* pCore = _SearchBar::CreateSearchBarN();
        r = GetLastResult();
@@ -260,7 +260,7 @@ _SearchBarImpl::Initialize(bool enableSearchBarButton, KeypadAction keypadAction
        }
 
        __pEditField = new (std::nothrow) EditField();
-       SysTryReturnResult(NID_UI_CTRL, __pEditField, E_OUT_OF_MEMORY, "Memory allocation failed.");
+       SysTryReturnResult(NID_UI_CTRL, __pEditField != null, E_OUT_OF_MEMORY, "Memory allocation failed.");
 
        r = __pEditField->Construct(GetBoundsF(), EDIT_FIELD_STYLE_NORMAL, INPUT_STYLE_OVERLAY, EDIT_FIELD_TITLE_STYLE_NONE, true);
        SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
@@ -273,13 +273,13 @@ _SearchBarImpl::Initialize(bool enableSearchBarButton, KeypadAction keypadAction
 
        __pEditFieldImpl = _EditFieldImpl::GetInstance(*__pEditField);
        SysTryReturnResult(NID_UI_CTRL, __pEditFieldImpl != null, E_SYSTEM,
-                          "A system error has occured. Failed to EditFieldImpl instance");
+                          "A system error has occurred. Failed to get _EditFieldImpl instance.");
 
        String cancelButtonText;
        GET_STRING_CONFIG(IDS_TPLATFORM_BUTTON_CANCEL_ABB, cancelButtonText);
 
        __pButton = new (std::nothrow) Button();
-       SysTryReturnResult(NID_UI_CTRL, __pButton, E_OUT_OF_MEMORY, "Memory allocation failed.");
+       SysTryReturnResult(NID_UI_CTRL, __pButton != null, E_OUT_OF_MEMORY, "Memory allocation failed.");
 
        r = __pButton->Construct(GetBoundsF(), cancelButtonText);
        SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
@@ -289,49 +289,49 @@ _SearchBarImpl::Initialize(bool enableSearchBarButton, KeypadAction keypadAction
 
        __pButtonImpl = _ButtonImpl::GetInstance(*__pButton);
        SysTryReturnResult(NID_UI_CTRL, __pButtonImpl != null, E_SYSTEM,
-                          "A system error has occured. Failed to ButtonImpl instance");
+                          "A system error has occurred. Failed to get _ButtonImpl instance.");
 
        r = __pSearchBar->Initialize(enableSearchBarButton, coreKeypadAction);
        SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
 
        __pPublicActionEvent = _PublicActionEvent::CreateInstanceN(GetPublic());
        r = GetLastResult();
-       SysTryReturn(NID_UI_CTRL, __pPublicActionEvent, r, r, "[%s] Propagating.", GetErrorMessage(r));
+       SysTryReturn(NID_UI_CTRL, __pPublicActionEvent != null, r, r, "[%s] Propagating.", GetErrorMessage(r));
 
        r = __pSearchBar->AddActionEventListener(*this);
        SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
 
        __pPublicKeypadEvent = _PublicKeypadEvent::CreateInstanceN(GetPublic());
        r = GetLastResult();
-       SysTryReturn(NID_UI_CTRL, __pPublicKeypadEvent, r, r, "[%s] Propagating.", GetErrorMessage(r));
+       SysTryReturn(NID_UI_CTRL, __pPublicKeypadEvent != null, r, r, "[%s] Propagating.", GetErrorMessage(r));
 
        r = __pSearchBar->AddKeypadEventListener(*this);
        SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
 
        __pPublicTextBlockEvent = _PublicTextBlockEvent::CreateInstanceN(GetPublic());
        r = GetLastResult();
-       SysTryReturn(NID_UI_CTRL, __pPublicTextBlockEvent, r, r, "[%s] Propagating.", GetErrorMessage(r));
+       SysTryReturn(NID_UI_CTRL, __pPublicTextBlockEvent != null, r, r, "[%s] Propagating.", GetErrorMessage(r));
 
        r = __pSearchBar->AddTextBlockEventListener(*this);
        SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
 
        __pPublicTextEvent = _PublicTextEvent::CreateInstanceN(GetPublic());
        r = GetLastResult();
-       SysTryReturn(NID_UI_CTRL, __pPublicTextEvent, r, r, "[%s] Propagating.", GetErrorMessage(r));
+       SysTryReturn(NID_UI_CTRL, __pPublicTextEvent != null, r, r, "[%s] Propagating.", GetErrorMessage(r));
 
        r = __pSearchBar->AddTextEventListener(*this);
        SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
 
        __pPublicSearchBarEvent = _PublicSearchBarEvent::CreateInstanceN(GetPublic());
        r = GetLastResult();
-       SysTryReturn(NID_UI_CTRL, __pPublicSearchBarEvent, r, r, "[%s] Propagating.", GetErrorMessage(r));
+       SysTryReturn(NID_UI_CTRL, __pPublicSearchBarEvent != null, r, r, "[%s] Propagating.", GetErrorMessage(r));
 
        r = __pSearchBar->AddSearchBarEventListener(*this);
        SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
 
        __pPublicLanguageEvent = _PublicLanguageEvent::CreateInstanceN(GetPublic());
        r = GetLastResult();
-       SysTryReturn(NID_UI_CTRL, __pPublicLanguageEvent, r, r, "[%s] Propagating.", GetErrorMessage(r));
+       SysTryReturn(NID_UI_CTRL, __pPublicLanguageEvent != null, r, r, "[%s] Propagating.", GetErrorMessage(r));
 
        r = __pSearchBar->AddLanguageEventListener(*this);
        SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
@@ -362,7 +362,7 @@ _SearchBarImpl::SetContent(const Control* pContent)
                const _Control& content = _ControlImpl::GetInstance(*pContent)->GetCore();
                bool isContentAttachable = __pSearchBar->IsContentAttachable(&content);
                SysTryReturn(NID_UI_CTRL, isContentAttachable, E_INVALID_ARG, E_INVALID_ARG,
-                            "[E_INVALID_ARG] Invalid argument(s) is used. The content cannot be set.");
+                                "[%s] Invalid argument(s) is used. The content cannot be set.", GetErrorMessage(E_INVALID_ARG));
        }
 
        if (pContent != null && __pContentControl == null)
@@ -683,7 +683,7 @@ _SearchBarImpl::Clear(void)
        r = __pSearchBar->Clear();
 
        SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM,
-                          "A system error has occured. Failed to clear the text.");
+                          "A system error has occurred. Failed to clear the text.");
        return r;
 }
 
@@ -807,7 +807,7 @@ _SearchBarImpl::RemoveTextBlock(void)
        ClearLastResult();
        result r = __pSearchBar->RemoveTextBlock();
        SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, E_SYSTEM,
-                    "[E_SYSTEM] A system error has occured. Unable to remove the text block.");
+                        "[%s] A system error has occurred. Unable to remove the text block.", GetErrorMessage(E_SYSTEM));
 
        return r;
 }
@@ -1064,8 +1064,8 @@ _SearchBarImpl::AddActionEventListener(IActionEventListener& listener)
 {
        ClearLastResult();
 
-       SysTryReturn(NID_UI_CTRL, __pPublicActionEvent, E_SYSTEM, E_SYSTEM,
-                    "[E_SYSTEM] A system error has occurred.");
+       SysTryReturn(NID_UI_CTRL, __pPublicActionEvent != null, E_SYSTEM, E_SYSTEM,
+                        "[%s] A system error has occurred.", GetErrorMessage(E_SYSTEM));
 
        result r = __pPublicActionEvent->AddListener(listener);
        SysTryReturnResult(NID_UI_CTRL, r != E_OBJ_ALREADY_EXIST, E_SYSTEM,
@@ -1078,7 +1078,7 @@ _SearchBarImpl::RemoveActionEventListener(IActionEventListener& listener)
 {
        ClearLastResult();
 
-       SysTryReturn(NID_UI_CTRL, __pPublicActionEvent, E_SYSTEM, E_SYSTEM,
+       SysTryReturn(NID_UI_CTRL, __pPublicActionEvent != null, E_SYSTEM, E_SYSTEM,
                     "[E_SYSTEM] A system error has occurred.");
 
        result r = __pPublicActionEvent->RemoveListener(listener);
@@ -1092,8 +1092,8 @@ _SearchBarImpl::AddKeypadEventListener(IKeypadEventListener& listener)
 {
        ClearLastResult();
 
-       SysTryReturn(NID_UI_CTRL, __pPublicKeypadEvent, E_SYSTEM, E_SYSTEM,
-                    "[E_SYSTEM] A system error has occurred.");
+       SysTryReturn(NID_UI_CTRL, __pPublicKeypadEvent != null, E_SYSTEM, E_SYSTEM,
+                        "[%s] A system error has occurred.", GetErrorMessage(E_SYSTEM));
 
        result r = __pPublicKeypadEvent->AddListener(listener);
        SysTryReturnResult(NID_UI_CTRL, r != E_OBJ_ALREADY_EXIST, E_SYSTEM,
@@ -1107,8 +1107,8 @@ _SearchBarImpl::RemoveKeypadEventListener(IKeypadEventListener& listener)
 {
        ClearLastResult();
 
-       SysTryReturn(NID_UI_CTRL, __pPublicKeypadEvent, E_SYSTEM, E_SYSTEM,
-                    "[E_SYSTEM] A system error has occurred.");
+       SysTryReturn(NID_UI_CTRL, __pPublicKeypadEvent != null, E_SYSTEM, E_SYSTEM,
+                        "[%s] A system error has occurred.", GetErrorMessage(E_SYSTEM));
 
        result r = __pPublicKeypadEvent->RemoveListener(listener);
        SysTryReturnResult(NID_UI_CTRL, r != E_OBJ_NOT_FOUND, E_SYSTEM,
@@ -1122,8 +1122,8 @@ _SearchBarImpl::AddTextBlockEventListener(ITextBlockEventListener& listener)
 {
        ClearLastResult();
 
-       SysTryReturn(NID_UI_CTRL, __pPublicTextBlockEvent, E_SYSTEM, E_SYSTEM,
-                    "[E_SYSTEM] A system error has occurred.");
+       SysTryReturn(NID_UI_CTRL, __pPublicTextBlockEvent != null, E_SYSTEM, E_SYSTEM,
+                        "[%s] A system error has occurred.", GetErrorMessage(E_SYSTEM));
 
        result r = __pPublicTextBlockEvent->AddListener(listener);
        SysTryReturnResult(NID_UI_CTRL, r != E_OBJ_ALREADY_EXIST, E_SYSTEM,
@@ -1137,8 +1137,8 @@ _SearchBarImpl::RemoveTextBlockEventListener(ITextBlockEventListener& listener)
 {
        ClearLastResult();
 
-       SysTryReturn(NID_UI_CTRL, __pPublicTextBlockEvent, E_SYSTEM, E_SYSTEM,
-                    "[E_SYSTEM] A system error has occurred.");
+       SysTryReturn(NID_UI_CTRL, __pPublicTextBlockEvent != null, E_SYSTEM, E_SYSTEM,
+                        "[%s] A system error has occurred.", GetErrorMessage(E_SYSTEM));
 
        result r = __pPublicTextBlockEvent->RemoveListener(listener);
        SysTryReturnResult(NID_UI_CTRL, r != E_OBJ_NOT_FOUND, E_SYSTEM,
@@ -1153,8 +1153,8 @@ _SearchBarImpl::AddTextEventListener(ITextEventListener& listener)
 {
        ClearLastResult();
 
-       SysTryReturn(NID_UI_CTRL, __pPublicTextEvent, E_SYSTEM, E_SYSTEM,
-                    "[E_SYSTEM] A system error has occurred.");
+       SysTryReturn(NID_UI_CTRL, __pPublicTextEvent != null, E_SYSTEM, E_SYSTEM,
+                        "[%s] A system error has occurred.", GetErrorMessage(E_SYSTEM));
 
        result r = __pPublicTextEvent->AddListener(listener);
        SysTryReturnResult(NID_UI_CTRL, r != E_OBJ_ALREADY_EXIST, E_SYSTEM,
@@ -1168,8 +1168,8 @@ _SearchBarImpl::RemoveTextEventListener(ITextEventListener& listener)
 {
        ClearLastResult();
 
-       SysTryReturn(NID_UI_CTRL, __pPublicTextEvent, E_SYSTEM, E_SYSTEM,
-                    "[E_SYSTEM] A system error has occurred.");
+       SysTryReturn(NID_UI_CTRL, __pPublicTextEvent != null, E_SYSTEM, E_SYSTEM,
+                        "[%s] A system error has occurred.", GetErrorMessage(E_SYSTEM));
 
        result r = __pPublicTextEvent->RemoveListener(listener);
        SysTryReturnResult(NID_UI_CTRL, r != E_OBJ_NOT_FOUND, E_SYSTEM,
@@ -1183,8 +1183,8 @@ _SearchBarImpl::AddSearchBarEventListener(const ISearchBarEventListener& listene
 {
        ClearLastResult();
 
-       SysTryReturn(NID_UI_CTRL, __pPublicSearchBarEvent, E_SYSTEM, E_SYSTEM,
-                    "[E_SYSTEM] A system error has occurred.");
+       SysTryReturn(NID_UI_CTRL, __pPublicSearchBarEvent != null, E_SYSTEM, E_SYSTEM,
+                        "[%s] A system error has occurred.", GetErrorMessage(E_SYSTEM));
 
        result r = __pPublicSearchBarEvent->AddListener(listener);
        SysTryReturnResult(NID_UI_CTRL, r != E_OBJ_ALREADY_EXIST, E_SYSTEM,
@@ -1198,8 +1198,8 @@ _SearchBarImpl::RemoveSearchBarEventListener(const ISearchBarEventListener& list
 {
        ClearLastResult();
 
-       SysTryReturn(NID_UI_CTRL, __pPublicSearchBarEvent, E_SYSTEM, E_SYSTEM,
-                    "[E_SYSTEM] A system error has occurred.");
+       SysTryReturn(NID_UI_CTRL, __pPublicSearchBarEvent != null, E_SYSTEM, E_SYSTEM,
+                        "[%s] A system error has occurred.", GetErrorMessage(E_SYSTEM));
 
        result r = __pPublicSearchBarEvent->RemoveListener(listener);
        SysTryReturnResult(NID_UI_CTRL, r != E_OBJ_NOT_FOUND, E_SYSTEM,
@@ -1253,7 +1253,7 @@ _SearchBarImpl::OnActionPerformed(const _Control& source, int actionId)
        {
                IEventArg* pEventArg = _PublicActionEvent::CreateActionEventArgN(actionId);
                result r = GetLastResult();
-               SysTryReturnVoidResult(NID_UI_CTRL, pEventArg, r, "[%s] Propagating.", GetErrorMessage(r));
+               SysTryReturnVoidResult(NID_UI_CTRL, pEventArg != null, r, "[%s] Propagating.", GetErrorMessage(r));
 
                __pPublicActionEvent->Fire(*pEventArg);
        }
@@ -1270,7 +1270,7 @@ _SearchBarImpl::OnKeypadWillOpen(void)
                IEventArg* pEventArg = _PublicKeypadEvent::CreateKeypadEventArgN(
                        GetPublic(), KEYPAD_ACTION_SEARCH, KEYPAD_EVENT_STATUS_CREATED);
                result r = GetLastResult();
-               SysTryReturnVoidResult(NID_UI_CTRL, pEventArg, r, "[%s] Propagating.", GetErrorMessage(r));
+               SysTryReturnVoidResult(NID_UI_CTRL, pEventArg != null, r, "[%s] Propagating.", GetErrorMessage(r));
 
                __pPublicKeypadEvent->Fire(*pEventArg);
        }
@@ -1287,7 +1287,7 @@ _SearchBarImpl::OnKeypadOpened(void)
                IEventArg* pEventArg = _PublicKeypadEvent::CreateKeypadEventArgN(
                        GetPublic(), KEYPAD_ACTION_SEARCH, KEYPAD_EVENT_STATUS_OPEN);
                result r = GetLastResult();
-               SysTryReturnVoidResult(NID_UI_CTRL, pEventArg, r, "[%s] Propagating.", GetErrorMessage(r));
+               SysTryReturnVoidResult(NID_UI_CTRL, pEventArg != null, r, "[%s] Propagating.", GetErrorMessage(r));
 
                __pPublicKeypadEvent->Fire(*pEventArg);
        }
@@ -1305,7 +1305,7 @@ _SearchBarImpl::OnKeypadClosed(void)
                IEventArg* pEventArg = _PublicKeypadEvent::CreateKeypadEventArgN(
                        GetPublic(), KEYPAD_ACTION_SEARCH, KEYPAD_EVENT_STATUS_CLOSE);
                result r = GetLastResult();
-               SysTryReturnVoidResult(NID_UI_CTRL, pEventArg, r, "[%s] Propagating.", GetErrorMessage(r));
+               SysTryReturnVoidResult(NID_UI_CTRL, pEventArg != null, r, "[%s] Propagating.", GetErrorMessage(r));
 
                __pPublicKeypadEvent->Fire(*pEventArg);
        }
@@ -1322,7 +1322,7 @@ _SearchBarImpl::OnKeypadBoundsChanged(void)
                IEventArg* pEventArg = _PublicKeypadEvent::CreateKeypadEventArgN(
                        GetPublic(), KEYPAD_ACTION_SEARCH, KEYPAD_EVENT_STATUS_BOUNDS_CHANGED);
                result r = GetLastResult();
-               SysTryReturnVoidResult(NID_UI_CTRL, pEventArg, r, "[%s] Propagating.", GetErrorMessage(r));
+               SysTryReturnVoidResult(NID_UI_CTRL, pEventArg != null, r, "[%s] Propagating.", GetErrorMessage(r));
 
                __pPublicKeypadEvent->Fire(*pEventArg);
        }
@@ -1341,7 +1341,7 @@ _SearchBarImpl::OnKeypadActionPerformed(CoreKeypadAction keypadAction)
                IEventArg* pEventArg = _PublicKeypadEvent::CreateKeypadEventArgN(
                        GetPublic(), publicKeypadAction, KEYPAD_EVENT_STATUS_ENTERACTION);
                result r = GetLastResult();
-               SysTryReturnVoidResult(NID_UI_CTRL, pEventArg, r, "[%s] Propagating.", GetErrorMessage(r));
+               SysTryReturnVoidResult(NID_UI_CTRL, pEventArg != null, r, "[%s] Propagating.", GetErrorMessage(r));
 
                __pPublicKeypadEvent->Fire(*pEventArg);
        }
@@ -1357,7 +1357,7 @@ _SearchBarImpl::OnTextBlockSelected(_Control& source, int start, int end)
        {
                IEventArg* pEventArg = _PublicTextBlockEvent::CreateTextBlockEventArgN(start, end);
                result r = GetLastResult();
-               SysTryReturnVoidResult(NID_UI_CTRL, pEventArg, r, "[%s] Propagating.", GetErrorMessage(r));
+               SysTryReturnVoidResult(NID_UI_CTRL, pEventArg != null, r, "[%s] Propagating.", GetErrorMessage(r));
 
                __pPublicTextBlockEvent->Fire(*pEventArg);
        }
@@ -1373,7 +1373,7 @@ _SearchBarImpl::OnTextValueChanged(const _Control& source)
        {
                IEventArg* pEventArg = _PublicTextEvent::CreateTextEventArgN(TEXT_EVENT_CHANGED);
                result r = GetLastResult();
-               SysTryReturnVoidResult(NID_UI_CTRL, pEventArg, r, "[%s] Propagating.", GetErrorMessage(r));
+               SysTryReturnVoidResult(NID_UI_CTRL, pEventArg != null, r, "[%s] Propagating.", GetErrorMessage(r));
 
                __pPublicTextEvent->Fire(*pEventArg);
        }
@@ -1389,7 +1389,7 @@ _SearchBarImpl::OnTextValueChangeCanceled(const _Control& source)
        {
                IEventArg* pEventArg = _PublicTextEvent::CreateTextEventArgN(TEXT_EVENT_CANCELED);
                result r = GetLastResult();
-               SysTryReturnVoidResult(NID_UI_CTRL, pEventArg, r, "[%s] Propagating.", GetErrorMessage(r));
+               SysTryReturnVoidResult(NID_UI_CTRL, pEventArg != null, r, "[%s] Propagating.", GetErrorMessage(r));
 
                __pPublicTextEvent->Fire(*pEventArg);
        }
@@ -1418,7 +1418,7 @@ _SearchBarImpl::OnSearchBarModeChanged(_SearchBar& source, SearchBarMode mode)
        {
                IEventArg* pEventArg = _PublicSearchBarEvent::CreateSearchBarEventArgN(SEARCH_BAR_EVENT_MODE_CHANGE);
                result r = GetLastResult();
-               SysTryReturnVoidResult(NID_UI_CTRL, pEventArg, r, "[%s] Propagating.", GetErrorMessage(r));
+               SysTryReturnVoidResult(NID_UI_CTRL, pEventArg != null, r, "[%s] Propagating.", GetErrorMessage(r));
 
                __pPublicSearchBarEvent->Fire(*pEventArg);
        }
@@ -1432,7 +1432,7 @@ _SearchBarImpl::OnLanguageChanged(LanguageCode oldLanguage, LanguageCode newLang
        {
                IEventArg* pKLanguageEventArg = _PublicLanguageEvent::CreateLanguageEventArgN(GetPublic(), oldLanguage, newLanguage);
                result r = GetLastResult();
-               SysTryReturnVoidResult(NID_UI_CTRL, pKLanguageEventArg, r, "[%s] Propagating.", GetErrorMessage(r));
+               SysTryReturnVoidResult(NID_UI_CTRL, pKLanguageEventArg != null, r, "[%s] Propagating.", GetErrorMessage(r));
 
                __pPublicLanguageEvent->Fire(*pKLanguageEventArg);
        }
@@ -1449,7 +1449,7 @@ _SearchBarImpl::OnFocusEventListenerAdded(IFocusEventListener& listener)
        ClearLastResult();
        SysTryReturnVoidResult(NID_UI,
                                __pPublicFocusEventListeners->Add(const_cast <IFocusEventListener*>(&listener)) == E_SUCCESS, E_SYSTEM,
-                               "[E_SYSTEM] A system error has occured. Failed to add listener.");
+                               "[E_SYSTEM] A system error has occurred. Failed to add listener.");
 }
 
 void
@@ -1458,7 +1458,7 @@ _SearchBarImpl::OnFocusEventListenerRemoved(IFocusEventListener& listener)
        ClearLastResult();
        SysTryReturnVoidResult(NID_UI,
                                __pPublicFocusEventListeners->Remove(&listener) == E_SUCCESS, E_SYSTEM,
-                               "[E_SYSTEM] A system error has occured. Failed to remove listener.");
+                               "[E_SYSTEM] A system error has occurred. Failed to remove listener.");
 }
 
 void
@@ -1701,7 +1701,7 @@ protected:
                        return null;
                }
 
-               pSearchBar = new (std::nothrow) SearchBar;
+               pSearchBar = new (std::nothrow) SearchBar();
                if (pSearchBar == null)
                {
                        return null;
index 481392d..0a56ab1 100644 (file)
@@ -24,6 +24,7 @@
 #include <FBaseErrorDefine.h>
 #include <FGrp_BitmapImpl.h>
 #include "FUi_ResourceManager.h"
+#include "FUi_CoordinateSystemUtils.h"
 #include "FUiAnim_VisualElement.h"
 #include "FUiCtrl_Edit.h"
 #include "FUiCtrl_Form.h"
@@ -31,7 +32,6 @@
 #include "FUiCtrl_SearchBarModel.h"
 #include "FUiCtrl_SearchBarPresenter.h"
 #include "FUiCtrl_Toolbar.h"
-#include "FUi_CoordinateSystemUtils.h"
 
 using namespace Tizen::Graphics;
 using namespace Tizen::Ui::Animations;
@@ -86,31 +86,31 @@ _SearchBarPresenter::Construct(const _SearchBar& searchBar)
        _VisualElement* pSearchBarElement = null;
 
        __pSearchBar = const_cast <_SearchBar*>(&searchBar);
-       SysTryReturn(NID_UI_CTRL, __pSearchBar, E_SYSTEM, E_SYSTEM,
-                    "[E_SYSTEM] A system error has occurred. The searchbar instance is null.");
+       SysTryReturn(NID_UI_CTRL, __pSearchBar != null, E_SYSTEM, E_SYSTEM,
+                        "[%s] A system error has occurred. The _Searchbar instance is null.", GetErrorMessage(E_SYSTEM));
 
        __pCancelButton = __pSearchBar->GetSearchBarButton();
-       SysTryReturn(NID_UI_CTRL, __pCancelButton, E_SYSTEM, E_SYSTEM,
-                    "[E_SYSTEM] A system error has occurred. The cancel button instance is null.");
+       SysTryReturn(NID_UI_CTRL, __pCancelButton != null, E_SYSTEM, E_SYSTEM,
+                        "[%s] A system error has occurred. The _Button instance is null.", GetErrorMessage(E_SYSTEM));
 
        __pEdit = __pSearchBar->GetSearchField();
-       SysTryReturn(NID_UI_CTRL, __pEdit, E_SYSTEM, E_SYSTEM,
-                    "[E_SYSTEM] A system error has occurred. The edit instance is null.");
+       SysTryReturn(NID_UI_CTRL, __pEdit != null, E_SYSTEM, E_SYSTEM,
+                        "[%s] A system error has occurred. The _Edit instance is null.", GetErrorMessage(E_SYSTEM));
 
        __pContainer = __pSearchBar->GetSearchBarContainer();
-       SysTryReturn(NID_UI_CTRL, __pContainer, E_SYSTEM, E_SYSTEM,
-                    " [E_SYSTEM] A system error has occurred. Failed to get the content.");
+       SysTryReturn(NID_UI_CTRL, __pContainer != null, E_SYSTEM, E_SYSTEM,
+                        " [%s] A system error has occurred. Failed to get the content.", GetErrorMessage(E_SYSTEM));
 
        r = LoadSearchBarBitmaps();
        SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
 
        _VisualElement* pEditElement = __pEdit->GetVisualElement();
        SysTryReturn(NID_UI_CTRL, pEditElement, E_SYSTEM, E_SYSTEM,
-                    "[E_SYSTEM] A system error has occurred. Failed to get edit visual element.");
+                        "[%s] A system error has occurred. Failed to get edit visual element.", GetErrorMessage(E_SYSTEM));
 
        __pIconElement = new (std::nothrow) _VisualElement();
-       SysTryCatch(NID_UI_CTRL, __pIconElement, , E_OUT_OF_MEMORY,
-                   "[E_OUT_OF_MEMORY] Memory allocation failed.");
+       SysTryCatch(NID_UI_CTRL, __pIconElement != null, , E_OUT_OF_MEMORY,
+                       "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
 
        r = __pIconElement->Construct();
        SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
@@ -127,7 +127,7 @@ _SearchBarPresenter::Construct(const _SearchBar& searchBar)
 
        pSearchBarElement = __pSearchBar->GetVisualElement();
        SysTryCatch(NID_UI_CTRL, pSearchBarElement, , E_SYSTEM,
-                   "[E_SYSTEM] A system error has occurred. Failed to get searchbar's visual element.");
+                       "[%s] A system error has occurred. Failed to get searchbar's visual element.", GetErrorMessage(E_SYSTEM));
 
        return r;
 
@@ -152,24 +152,21 @@ _SearchBarPresenter::LoadSearchBarBitmaps()
 
        __currentBgColor = __pSearchBar->GetColor();
 
-       GET_REPLACED_BITMAP_CONFIG_N(SEARCHBAR::BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __currentBgColor, __pReplacedSearchBarBitmap);
-       SysTryCatch(NID_UI_CTRL, __pReplacedSearchBarBitmap != null, r = GetLastResult(), GetLastResult(),"[%s] Propagating.",
-               GetErrorMessage(GetLastResult()));
+       r = GET_REPLACED_BITMAP_CONFIG_N(SEARCHBAR::BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __currentBgColor, __pReplacedSearchBarBitmap);
+       SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r,"[%s] Propagating.", GetErrorMessage(r));
 
        r = GET_BITMAP_CONFIG_N(SEARCHBAR::ICON_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pSearchFieldEffectBitmap);
        SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r,"[%s] Propagating.", GetErrorMessage(r));
 
        GET_COLOR_CONFIG(SEARCHBAR::ICON_BG_NORMAL, searchFieldIconColor);
 
-       GET_REPLACED_BITMAP_CONFIG_N(SEARCHBAR::ICON_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, searchFieldIconColor, __pReplacedSearchFieldNormalBitmap);
-       SysTryCatch(NID_UI_CTRL, __pReplacedSearchFieldNormalBitmap != null, r = GetLastResult(), GetLastResult(),"[%s] Propagating.",
-               GetErrorMessage(GetLastResult()));
+       r = GET_REPLACED_BITMAP_CONFIG_N(SEARCHBAR::ICON_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, searchFieldIconColor, __pReplacedSearchFieldNormalBitmap);
+       SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r,"[%s] Propagating.", GetErrorMessage(r));
 
        GET_COLOR_CONFIG(SEARCHBAR::ICON_BG_DISABLED, searchFieldIconColor);
 
-       GET_REPLACED_BITMAP_CONFIG_N(SEARCHBAR::ICON_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, searchFieldIconColor, __pReplacedSearchFieldDisabledBitmap);
-       SysTryCatch(NID_UI_CTRL, __pReplacedSearchFieldDisabledBitmap != null, r = GetLastResult(), GetLastResult(),"[%s] Propagating.",
-               GetErrorMessage(GetLastResult()));
+       r = GET_REPLACED_BITMAP_CONFIG_N(SEARCHBAR::ICON_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, searchFieldIconColor, __pReplacedSearchFieldDisabledBitmap);
+       SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r,"[%s] Propagating.", GetErrorMessage(r));
 
        return r;
 
@@ -194,12 +191,12 @@ _SearchBarPresenter::Install(void)
 {
        result r = E_SUCCESS;
 
-       _SearchBarModel* pModel = new (std::nothrow) _SearchBarModel;
-       SysTryReturn(NID_UI_CTRL, pModel, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+       _SearchBarModel* pModel = new (std::nothrow) _SearchBarModel();
+       SysTryReturn(NID_UI_CTRL, pModel != null, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
 
        r = pModel->Construct();
        SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM,
-                   "[E_SYSTEM] A system error has occurred. The searchbar model construction failed.");
+                       "[%s] A system error has occurred. The searchbar model construction failed.", GetErrorMessage(E_SYSTEM));
 
        __pSearchBarModel = pModel;
 
@@ -215,7 +212,7 @@ _SearchBarPresenter::UpdateContentArea(bool invalidate)
 {
        SearchBarMode mode = __pSearchBarModel->GetMode();
        SysTryReturn(NID_UI_CTRL, mode == SEARCH_BAR_MODE_INPUT, E_INVALID_OPERATION, E_INVALID_OPERATION,
-                    "[E_INVALID_OPERATION] The searchbar mode cannot be updated.");
+                        "[%s] The searchbar mode cannot be updated.", GetErrorMessage(E_INVALID_OPERATION));
 
        __pSearchBar->Invalidate(invalidate);
 
@@ -250,7 +247,7 @@ result
 _SearchBarPresenter::SetMode(SearchBarMode mode, bool isCalledByApp)
 {
        SysTryReturn(NID_UI_CTRL, IsModeLocked() == false, E_INVALID_OPERATION, E_INVALID_OPERATION,
-                    "[E_INVALID_OPERATION] The searchbar mode is locked.");
+                        "[%s] The searchbar mode is locked.", GetErrorMessage(E_INVALID_OPERATION));
 
        if (GetMode() == mode)
        {
@@ -261,7 +258,7 @@ _SearchBarPresenter::SetMode(SearchBarMode mode, bool isCalledByApp)
 
        result r = ChangeMode(mode, isCalledByApp);
        SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, E_SYSTEM,
-                    "[E_SYSTEM] A system error has occurred. Failed to change the mode of searchbar.");
+                        "[%s] A system error has occurred. Failed to change the mode of searchbar.", GetErrorMessage(E_SYSTEM));
 
        return r;
 }
@@ -297,7 +294,7 @@ _SearchBarPresenter::Draw(void)
                        imagePath = _BitmapImpl::GetInstance(*pBackgroundBitmap)->GetFileName();
                }
 
-               if(!imagePath.IsEmpty())
+               if (!imagePath.IsEmpty())
                {
                        __pSearchBar->GetVisualElement()->SetBackgroundColor(_Colorf((float)bgColor.GetRed() / 255, (float)bgColor.GetGreen() / 255, (float)bgColor.GetBlue() / 255, (float)bgColor.GetAlpha() / 255));
                        __pSearchBar->GetVisualElement()->SetImageSource(imagePath);
@@ -309,7 +306,7 @@ _SearchBarPresenter::Draw(void)
                        __lazyDecode = false;
                        Canvas* pCanvas = __pSearchBar->GetCanvasN();
                        r = GetLastResult();
-                       SysTryReturn(NID_UI_CTRL, (pCanvas != null), r, r, "[%s] Propagating.", GetErrorMessage(r));
+                       SysTryReturn(NID_UI_CTRL, pCanvas != null, r, r, "[%s] Propagating.", GetErrorMessage(r));
 
                        pCanvas->SetBackgroundColor(bgColor);
                        pCanvas->Clear();
@@ -348,9 +345,8 @@ _SearchBarPresenter::DrawSearchBarDefaultBitmap(void)
                delete __pReplacedSearchBarBitmap;
                __pReplacedSearchBarBitmap = null;
 
-               GET_REPLACED_BITMAP_CONFIG_N(SEARCHBAR::BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, bgColor, __pReplacedSearchBarBitmap);
-               r = GetLastResult();
-               SysTryReturn(NID_UI_CTRL, (__pReplacedSearchBarBitmap != null), r, r, "[%s] Propagating.", GetErrorMessage(r));
+               r = GET_REPLACED_BITMAP_CONFIG_N(SEARCHBAR::BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, bgColor, __pReplacedSearchBarBitmap);
+               SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r));
                __currentBgColor = bgColor;
        }
 
@@ -423,10 +419,10 @@ _SearchBarPresenter::SetContainerVisible(bool visible)
 result
 _SearchBarPresenter::DrawIcon(void)
 {
-       SysTryReturn(NID_UI_CTRL, __pEdit, E_SYSTEM, E_SYSTEM,
-                    "[E_SYSTEM] A system error has occurred. Failed to get edit instance.");
-       SysTryReturn(NID_UI_CTRL, __pIconElement, E_SYSTEM, E_SYSTEM,
-                    "[E_SYSTEM] A system error has occurred. Failed to get edit visual element.");
+       SysTryReturn(NID_UI_CTRL, __pEdit != null, E_SYSTEM, E_SYSTEM,
+                        "[%s] A system error has occurred. Failed to get _Edit instance.", GetErrorMessage(E_SYSTEM));
+       SysTryReturn(NID_UI_CTRL, __pIconElement != null, E_SYSTEM, E_SYSTEM,
+                        "[%s] A system error has occurred. Failed to get edit visual element.", GetErrorMessage(E_SYSTEM));
 
        result r = E_SUCCESS;
 
@@ -530,13 +526,13 @@ _SearchBarPresenter::ChangeMode(SearchBarMode mode, bool isCalledByApp)
 
                r = __pSearchBar->SendSearchBarEvent(_SEARCH_BAR_EVENT_MODE_CHANGE);
                SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, E_SYSTEM,
-                            "[E_SYSTEM] A system error has occurred. Failed to fire the searchbar event.");
+                                "[%s] A system error has occurred. Failed to fire the searchbar event.", GetErrorMessage(E_SYSTEM));
        }
        else
        {
                r = __pSearchBar->SendSearchBarEvent(_SEARCH_BAR_EVENT_MODE_CHANGE);
                SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, E_SYSTEM,
-                            "[E_SYSTEM] A system error has occurred. Failed to fire the searchbar event.");
+                                "[%s] A system error has occurred. Failed to fire the searchbar event.", GetErrorMessage(E_SYSTEM));
 
                InitializeInputModeLayout();
                SetCancelButtonVisible(true);
@@ -729,7 +725,7 @@ _SearchBarPresenter::OnCanvasRequestedN(const FloatRectangle& bounds)
        if (__lazyDecode)
        {
                Bitmap* pBackgroundBitmap = __pSearchBar->GetBackgroundBitmap();
-               SysTryReturn(NID_UI_CTRL, pBackgroundBitmap != null, null, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get the background bitmap.");
+               SysTryReturn(NID_UI_CTRL, pBackgroundBitmap != null, null, E_SYSTEM, "[%s] A system error has occurred. Failed to get the background bitmap.", GetErrorMessage(E_SYSTEM));
 
                //Decode the bitmap explicitly
                pBackgroundBitmap->IsNinePatchedBitmap();
index 9ff51c7..19f2dbe 100644 (file)
 
 #include <FUiCtrlSearchBar.h>
 #include "FUi_Control.h"
+#include "FUi_IAccessibilityListener.h"
 #include "FUiCtrl_Button.h"
 #include "FUiCtrl_Edit.h"
+#include "FUiCtrl_KeypadEvent.h"
+#include "FUiCtrl_LanguageEvent.h"
+#include "FUiCtrl_SearchBarEvent.h"
 #include "FUiCtrl_IActionEventListener.h"
 #include "FUiCtrl_IKeypadEventListener.h"
 #include "FUiCtrl_ILanguageEventListener.h"
 #include "FUiCtrl_ITextBlockEventListener.h"
 #include "FUiCtrl_ITextEventListener.h"
 #include "FUiCtrl_ISearchBarEventListener.h"
-#include "FUiCtrl_KeypadEvent.h"
-#include "FUiCtrl_LanguageEvent.h"
-#include "FUiCtrl_SearchBarEvent.h"
-#include "FUi_IAccessibilityListener.h"
 
 const int SEARCHBAR_COLOR_MAX = 3;
 const int SEARCHBAR_BUTTON_COLOR_MAX = 4;
index 6c79ac1..a20d48a 100644 (file)
 
 #include <FUiCtrlSearchBar.h>
 #include "FUi_ControlImpl.h"
+#include "FUiCtrl_PublicKeypadEvent.h"
+#include "FUiCtrl_PublicLanguageEvent.h"
+#include "FUiCtrl_PublicSearchBarEvent.h"
+#include "FUiCtrl_SearchBar.h"
 #include "FUiCtrl_IActionEventListener.h"
 #include "FUiCtrl_IKeypadEventListener.h"
 #include "FUiCtrl_ILanguageEventListener.h"
 #include "FUiCtrl_ITextBlockEventListener.h"
 #include "FUiCtrl_ITextEventListener.h"
 #include "FUiCtrl_ISearchBarEventListener.h"
-#include "FUiCtrl_PublicKeypadEvent.h"
-#include "FUiCtrl_PublicLanguageEvent.h"
-#include "FUiCtrl_PublicSearchBarEvent.h"
-#include "FUiCtrl_SearchBar.h"
 
 
 namespace Tizen { namespace Ui { namespace Controls