Modified, Sample resource issue
authorSinyoung Hwang <shiny.hwang@samsung.com>
Thu, 11 Apr 2013 05:57:56 +0000 (14:57 +0900)
committerSinyoung Hwang <shiny.hwang@samsung.com>
Thu, 11 Apr 2013 05:57:56 +0000 (14:57 +0900)
Change-Id: Id17f9f48215c68b72315dc914cc6bc7b346178de
Signed-off-by: Sinyoung Hwang <shiny.hwang@samsung.com>
project/inc/AppResourceId.h [new file with mode: 0644]
project/src/AppResourceId.cpp [new file with mode: 0644]
project/src/ChatFrm.cpp
project/src/MainFrm.cpp
project/src/SocketChatEntry.cpp

diff --git a/project/inc/AppResourceId.h b/project/inc/AppResourceId.h
new file mode 100644 (file)
index 0000000..bec5b50
--- /dev/null
@@ -0,0 +1,32 @@
+//
+// Tizen Native SDK
+// Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+#ifndef _APP_RESOURCE_ID_H_
+#define _APP_RESOURCE_ID_H_
+
+extern const wchar_t* IDF_MAINFRM;
+extern const wchar_t* IDC_CHECKTCP;
+extern const wchar_t* IDC_CHECKUDP;
+extern const wchar_t* IDC_CHECKServer;
+extern const wchar_t* IDC_EDITIPaddress;
+extern const wchar_t* IDC_EDITPort;
+extern const wchar_t* IDF_CHATFRM;
+extern const wchar_t* IDC_TEXT;
+extern const wchar_t* IDC_DATA;
+extern const wchar_t* IDC_Wait;
+
+#endif // _APP_RESOURCE_ID_H_
diff --git a/project/src/AppResourceId.cpp b/project/src/AppResourceId.cpp
new file mode 100644 (file)
index 0000000..53b3d72
--- /dev/null
@@ -0,0 +1,29 @@
+//
+// Tizen Native SDK
+// Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+#include "AppResourceId.h"
+
+const wchar_t* IDF_MAINFRM = L"IDF_MAINFRM";
+const wchar_t* IDC_CHECKTCP = L"IDC_CHECKTCP";
+const wchar_t* IDC_CHECKUDP = L"IDC_CHECKUDP";
+const wchar_t* IDC_CHECKServer = L"IDC_CHECKServer";
+const wchar_t* IDC_EDITIPaddress = L"IDC_EDITIPaddress";
+const wchar_t* IDC_EDITPort = L"IDC_EDITPort";
+const wchar_t* IDF_CHATFRM = L"IDF_CHATFRM";
+const wchar_t* IDC_TEXT = L"IDC_TEXT";
+const wchar_t* IDC_DATA = L"IDC_DATA";
+const wchar_t* IDC_Wait = L"IDC_Wait";
index 7b58467..3756332 100644 (file)
@@ -15,6 +15,7 @@
 // limitations under the License.
 //
 
+#include "AppResourceId.h"
 #include "SocketChat.h"
 #include "FormFactory.h"
 #include "ChatFrm.h"
@@ -96,7 +97,7 @@ bool
 ChatFrm::Initialize(void)
 {
     // Construct an XML form
-    Construct(L"IDF_CHATFRM");
+    Construct(IDF_CHATFRM);
 
     return true;
 }
@@ -134,21 +135,21 @@ ChatFrm::OnInitializing(void)
         __pFooter->AddActionEventListener(*this);
     }
 
-    __pLabelWait = static_cast< Label* >(GetControl(L"IDC_Wait"));
+    __pLabelWait = static_cast< Label* >(GetControl(IDC_Wait));
     if (__pLabelWait == null)
     {
         AppLog("Can't get label Handle");
         r = E_FAILURE;
     }
 
-    __pEditAreaData = static_cast< EditArea* >(GetControl(L"IDC_DATA"));
+    __pEditAreaData = static_cast< EditArea* >(GetControl(IDC_DATA));
     if (__pEditAreaData == null)
     {
         AppLog("Can't get edit area Handle");
         r = E_FAILURE;
     }
 
-    __pEditFieldtext = static_cast< EditField* >(GetControl(L"IDC_TEXT"));
+    __pEditFieldtext = static_cast< EditField* >(GetControl(IDC_TEXT));
     if (__pEditFieldtext == null)
     {
         AppLog("Can't get edit field Handle");
index 7454d75..7840c84 100644 (file)
@@ -15,6 +15,7 @@
 // limitations under the License.
 //
 
+#include "AppResourceId.h"
 #include "SocketChat.h"
 #include "FormFactory.h"
 #include "MainFrm.h"
@@ -57,7 +58,7 @@ bool
 MainFrm::Initialize(void)
 {
     // Construct an XML form
-    Construct(L"IDF_MAINFRM");
+    Construct(IDF_MAINFRM);
 
     return true;
 }
@@ -68,7 +69,7 @@ MainFrm::OnInitializing(void)
     result r = E_SUCCESS;
 
     // Get a button via resource ID
-    __pButtonServer = static_cast< CheckButton* >(GetControl(L"IDC_CHECKServer"));
+    __pButtonServer = static_cast< CheckButton* >(GetControl(IDC_CHECKServer));
 
     if (__pButtonServer != null)
     {
@@ -76,16 +77,16 @@ MainFrm::OnInitializing(void)
         __pButtonServer->AddActionEventListener(*this);
     }
 
-    __pButtonTcp = static_cast< CheckButton* >(GetControl(L"IDC_CHECKTCP"));
-    __pButtonUdp = static_cast< CheckButton* >(GetControl(L"IDC_CHECKUDP"));
+    __pButtonTcp = static_cast< CheckButton* >(GetControl(IDC_CHECKTCP));
+    __pButtonUdp = static_cast< CheckButton* >(GetControl(IDC_CHECKUDP));
 
-    __pEditIPAddress = static_cast< EditField* >(GetControl(L"IDC_EDITIPaddress"));
+    __pEditIPAddress = static_cast< EditField* >(GetControl(IDC_EDITIPaddress));
     if (__pEditIPAddress == null)
     {
         r = E_FAILURE;
     }
 
-    __pEditPort = static_cast< EditField* >(GetControl(L"IDC_EDITPort"));
+    __pEditPort = static_cast< EditField* >(GetControl(IDC_EDITPort));
 
     Footer* pFooter = GetFooter();
     if (pFooter != null)
index fe3bdaf..14c555a 100644 (file)
@@ -18,6 +18,7 @@
 /**
  * This file contains the Tizen application entry point.
  */
+
 #include <new>
 #include "SocketChat.h"