text
stringlengths 2.64k
30.4k
|
|---|
<|begin_of_text|>๋ฅ์ฌํฌ๋ก ๊ฐ์ด๋ ๋ถ(์์ฉ๊ฐ๋ฐ ๊ฐ์ด๋) title: ํ๋กํ ์ฝ ์ด๋ํฐ ๊ฐ๋ฐํ๊ธฐ contents: ๋ฅ์ฌํฌ๋ก์์ ๊ธฐ๋ณธ์ ์ผ๋ก ์ ๊ณตํ๋ ๋ฐ์ดํฐ ํต์ ๋ฐฉ์์ HTTP ํ๋กํ ์ฝ์ ์ฌ์ฉํด ์์ฒญ๊ณผ ์๋ต์ ์ฒ๋ฆฌํฉ๋๋ค. ์ด ๊ณผ์ ์์ ๋ฐ์ดํฐ ์์ฒด๋ฅผ ๋ณํํ์ง๋ ์์ต๋๋ค. ํ์ง๋ง ์ฌ์ฉ ํ๊ฒฝ์ ๋ฐ๋ผ ๋ฐ์ดํฐ๋ฅผ ์ํธํํ๊ฑฐ๋ ํน์ ํ์์ ๋ฐ์ดํฐ๋ฅผ ์์ ํ๊ณ ๋ณํํ๋ ๊ณผ์ ์ด ํ์ํ ์ ์์ต๋๋ค.ํ๋กํ ์ฝ ์ด๋ํฐ๋ฅผ ์ฌ์ฉํ๋ฉด ๊ฐ๋จํ ์ค์ ๋ง์ผ๋ก ๋ฐ์ดํฐ๋ฅผ ์ํธํํ๊ฑฐ๋ ๋ฐ์ดํฐ ๊ตฌ์กฐ๋ฅผ ๋ณํํด ์ํ๋ ๋์์ ๊ตฌํํ ์ ์์ต๋๋ค.## ํ๋กํ ์ฝ ์ด๋ํฐ ๋ชจ๋ ๋ง๋ค๊ณ ์ฑ์์ ์ฌ์ฉํ๊ธฐํ๋กํ ์ฝ ์ด๋ํฐ๋ฅผ ์ฌ์ฉํ๊ธฐ ์ํด์๋ ๋ฅ์ฌํฌ๋ก ๋ชจ๋ ๋๋ฒจ๋กํผ์์ ๋ชจ๋์ ๋ง๋ค๊ณ ๋ฅ์ฌํฌ๋ก ์คํ๋์ค์ ์์ฑ๋ ๋ชจ๋์ ๋ฑ๋กํ๊ณ ํ๋กํ ์ฝ, ์๋น์ค๋ฅผ ์ถ๊ฐํด์ผ ํฉ๋๋ค.### ํ๋กํ ์ฝ ์ด๋ํฐ ๋ชจ๋ ๋ง๋ค๊ธฐ๋จ๊ณ 1. ๋ฅ์ฌํฌ๋ก ๋ชจ๋ ๋๋ฒจ๋กํผ์์ ์๋ก์ด ํ๋ก์ ํธ๋ฅผ ๋ง๋ญ๋๋ค. ๋ฉ๋ด์์ [File > New > Project]๋ฅผ ์ ํํฉ๋๋ค.๋จ๊ณ 2. Project Wizard๊ฐ ์ด๋ฆฌ๋ฉด Module ํญ๋ชฉ์์ "Protocol Adaptor"๋ฅผ ์ ํํฉ๋๋ค.๋จ๊ณ 3. ํ๋ก์ ํธ ID๋ฅผ ์
๋ ฅํ๊ณ [Next] ๋ฒํผ์ ํด๋ฆญํฉ๋๋ค.๋จ๊ณ 4. Object ID๋ฅผ ์
๋ ฅํ๊ณ FinalClass ํญ๋ชฉ์ true๋ก ๋ณ๊ฒฝํฉ๋๋ค.๋จ๊ณ 5. ํ๋ก์ ํธ๊ฐ ์์ฑ๋๊ณ basicPtAdp.js ํ์ผ์ด ํธ์ง์ฐฝ์ ํ์๋ฉ๋๋ค.### ํ๋กํ ์ฝ ์ด๋ํฐ ๋ชจ๋ ํธ์งํ๊ธฐํ๋กํ ์ฝ ์ด๋ํฐ ๋ชจ๋์ ์๋ก ๋ง๋ค๋ฉด ๊ธฐ๋ณธ์ ์ผ๋ก 4๊ฐ์ ํจ์๊ฐ ์์ฑ๋ฉ๋๋ค.[Table]| Function | ์ค๋ช
||:-----------|:--------------------------------------------------------------------------------------------------------------------------|| initialize | ์ค๋ธ์ ํธ๊ฐ ์์ฑ๋๋ ์์ ์ initialize ํจ์๊ฐ ํธ์ถ๋ฉ๋๋ค. || | ์ธ๋ถ ๋ชจ๋์ด ํ์ํ ๊ฒฝ์ฐ initialize ํจ์ ๋ด์์ ๋ชจ๋์ ์์ฑํ๊ฑฐ๋ ์ด๊ธฐํํฉ๋๋ค. || finalize | ์ค๋ธ์ ํธ๊ฐ ์ญ์ ๋๋ ์์ ์ finalize ํจ์๊ฐ ํธ์ถ๋ฉ๋๋ค. || | ์ธ๋ถ ๋ชจ๋์ ์์ฑํ๊ฑฐ๋ ๋ง๋ฌด๋ฆฌ๊ฐ ํ์ํ ๊ฒฝ์ฐ finalize ํจ์ ๋ด์์ ์์ฑ๋ ๋ชจ๋์ ์ญ์ ํ๊ณ ๋ฉ๋ชจ๋ฆฌ์ ๋จ์ง ์๋๋ก ์ฒ๋ฆฌํฉ๋๋ค. || encrypt | ํต์ ์ด ์คํ๋๊ธฐ ์ ์ encrypt ํจ์๊ฐ ํธ์ถ๋ฉ๋๋ค. ์ ์กํ ๋ฐ์ดํฐ๋ฅผ ์ํธํํ๊ฑฐ๋ ์ํ๋ ํํ๋ก ๋ณํํ ์ ์์ต๋๋ค. || decrypt | ํต์ ์ด ๋๋ ํ์ decrypt ํจ์๊ฐ ํธ์ถ๋ฉ๋๋ค. ์๋ต์ผ๋ก ์์ ํ ๋ฐ์ดํฐ๋ฅผ ๋ณตํธํํ๊ฑฐ๋ ์ํ๋ ํํ๋ก ๋ณํํ ์ ์์ต๋๋ค. |initializenexacro.basicPtAdp.prototype.initialize = function() { trace("basicPtAdp initialize");};์ธ๋ถ ํ๋ฌ๊ทธ์ธ ๋ชจ๋์ ์ฌ์ฉํ ๊ฒฝ์ฐ์๋ ์๋์ ๊ฐ์ด PluginElement๋ฅผ ์ฌ์ฉํด ์ด๊ธฐํํฉ๋๋ค.nexacro.basicPtAdp.prototype.initialize = function() { this._plugin = new nexacro.PluginElement(); this._plugin.setElementClassId("Microsoft.XMLDOM"); //this._plugin.setElementClassId("{7E9FDB80-5316-11D4-B02C-00C04F0CD404}"); this._plugin.create(); };finalizenexacro.basicPtAdp.prototype.finalize = function() { trace("basicPtAdp finalize");};initialize ํจ์์์ ์์ฑํ ์ธ๋ถ ๋ชจ๋์ ์ญ์ ์ฒ๋ฆฌํฉ๋๋ค.nexacro.basicPtAdp.prototype.finalize = function(){ this._plugin.destroy(); delete this._plugin; }encrypt์ ์กํ ๋ฐ์ดํฐ๋ฅผ ๋ณํํ๊ณ return ํ๋ ๋ฌธ์์ด ๋ณ์์ ๋ด์์ ์ฒ๋ฆฌํฉ๋๋ค.nexacro.basicPtAdp.prototype.encrypt = function(strUrl, strData) { trace("encrypt url=" + strUrl + ";data=" + strData); return strData;};decrypt์๋ต์ผ๋ก ๋ฐ์ ๋ฐ์ดํฐ๋ฅผ ๋ณํํ๊ณ ํธ์ถํ ์ฑ์ ์ ๋ฌํฉ๋๋ค.nexacro.basicPtAdp.prototype.decrypt = function(strUrl, strData) { trace("decrypt url=" + strUrl + ";data=" + strData); return strData;}### ํ๋กํ ์ฝ ์ด๋ํฐ ๋ชจ๋ ๋ฐฐํฌํ๊ธฐ๋จ๊ณ 1. ๋ฅ์ฌํฌ๋ก ๋ชจ๋ ๋๋ฒจ๋กํผ ๋ฉ๋ด[Deploy > Module Package]๋ฅผ ์ ํํ๊ณ Deploy Wizard๋ฅผ ์คํํฉ๋๋ค.๋จ๊ณ 2. Module Information์์ Type ํญ๋ชฉ์ "protocoladaptor"์ผ๋ก ๋ณ๊ฒฝํฉ๋๋ค.๋จ๊ณ 3. [Deploy] ๋ฒํผ์ ํด๋ฆญํด ๋ชจ๋์ ๋ฐฐํฌํฉ๋๋ค.### ๋ชจ๋ ์ค์นํ๊ณ ํ๋กํ ์ฝ ์๋น์ค ๋ฑ๋กํ๊ธฐ๋จ๊ณ 1. ๋ฅ์ฌํฌ๋ก ์คํ๋์ค ๋ฉ๋ด[File > Install Module]์ ์ ํํ๊ณ Install Module Wizard๋ฅผ ์คํํฉ๋๋ค.๋จ๊ณ 2. ๋ฅ์ฌํฌ๋ก ๋ชจ๋ ๋๋ฒจ๋กํผ์์ ๋ง๋ ๋ชจ๋ ์ค์น ํ์ผ์ ์ ํํ๊ณ ์ค์นํฉ๋๋ค.๋
ธํธ:๋ชจ๋ ๋ฉํ์ธํฌ ์์ฑ ์ค registration ์์ฑ๊ฐ์ด ๊ธฐ๋ณธ๊ฐ("deny")์ผ๋ก ์ค์ ๋๊ธฐ ๋๋ฌธ์ ์ค์น๋ ๋ชจ๋ ๋ชฉ๋ก์ด ๋ณด์ด์ง๋ ์์ต๋๋ค.๋จ๊ณ 3. Project Explorer์์ TypeDefinition ํญ๋ชฉ์ ์ ํํ๊ณ ์ปจํ
์คํธ ๋ฉ๋ด์์ [Add > Protocol]์ ์ ํํฉ๋๋ค.๋จ๊ณ 4. New Protocol Wizard์์ Protocol ID์ Prefix ID๋ฅผ ์ค์ ํฉ๋๋ค.๋จ๊ณ 5. [Next] ๋ฒํผ์ ํด๋ฆญํ๊ณ Web Browser ํญ๋ชฉ์ ์ฒดํฌํ๊ณ ClassName์ ์
๋ ฅํฉ๋๋ค.### ํ๋กํ ์ฝ ์ด๋ํฐ๋ฅผ ํตํด ์๋น์ค ํธ์ถํ๊ธฐtransaction ๋ฉ์๋ ์คํ ์ ์๋์ ๊ฐ์ด strURL ํ๋ผ๋ฏธํฐ์ ํ๋กํ ์ฝ ์ด๋ํฐ URL ํ์์ ์ ์ฉํ๋ฉด ํต์ ์์ฒญ์ด ๋ฐ๋ก ์๋ฒ๋ก ์ ๋ฌ๋์ง ์๊ณ ํ๋กํ ์ฝ ์ด๋ํฐ๋ฅผ ๊ฑฐ์น๊ฒ ๋ฉ๋๋ค.this.Button00_onclick = function(obj:nexacro.Button,e:nexacro.ClickEventInfo){ this.transaction("srv00", "basicPtAdp://127.0.0.1:4098/test.xml", "","dsOut=Dataset00","value=a","fnCallback");};this.fnCallback = function(id, code, message){ trace("Error["+code+"]:"+message);}Button ํด๋ฆญ ์ ์๋์ ๊ฐ์ ์์๋ก ํ๋กํ ์ฝ ์ด๋ํฐ ๋์์ด ์ฒ๋ฆฌ๋๋ ๊ฒ์ ํ์ธํ ์ ์์ต๋๋ค.initialize์์ ์์๋ ์ด๊ธฐํ๋ ์๊ณ trace ๋ฉ์๋๋ง ์คํํฉ๋๋ค.encryptstrArgument ํ๋ผ๋ฏธํฐ๋ก ์ ๋ฌํ ๊ฐ์ด ์ฒ๋ฆฌ๋๋ ๊ฒ์ ํ์ธํฉ๋๋ค.decrypt์์ฒญ์ ๋ํ ์๋ต ๋ฐ์ดํฐ๋ฅผ ํ์ธํฉ๋๋ค.CallbackFunc์ ์ ์ฒ๋ฆฌ ํ ์ฝ๋ฐฑ ํจ์๊ฐ ๋์ํ๋ ๊ฒ์ ํ์ธํฉ๋๋ค.basicPtAdp initializeencrypt url=basicPtAdp://127.0.0.1:8080/test.xml;data=<?xml version="1.0" encoding="UTF-8"?><Root xmlns="http://www.nexacroplatform.com/platform/dataset"> <Parameters> <Parameter id="value">b</Parameter> </Parameters></Root>decrypt url=basicPtAdp://127.0.0.1:8080/test.xml;data=<?xml version="1.0" encoding="utf-8"?><Root xmlns="http://www.nexacroplatform.com/platform/dataset" ver="5000" > <Parameters> <Parameter id="ErrorCode" type="int">0</Parameter> <Parameter id="ErrorMsg" type="string">SUCC</Parameter> </Parameters> <Dataset id="customers"> <ColumnInfo> <Column id="id" type="STRING" size="4"/>...Error[0]:SAUCC## ์ถ๊ฐ๋ก ์ค์ ํ ์ ์๋ ์ธํฐํ์ด์ค ํจ์ํ๋กํ ์ฝ ์ด๋ํฐ์์๋ ์ถ๊ฐ๋ก ์ค์ ํ ์ ์๋ ์ธํฐํ์ด์ค ํจ์๋ฅผ ์ ๊ณตํฉ๋๋ค.### ์ฌ์ ์ํ ์ ์๋ ์ธํฐํ์ด์ค ํจ์์์๋ฐ์ nexacro.ProtocolAdp์์ ์ ๊ณตํ๋ ํจ์๋ฅผ ์ฌ์ ์ํ ์ ์์ต๋๋ค. ์์ฑ์ฐฝ์์ ์ถ๊ฐํด ์ฌ์ฉํ ์ ์์ต๋๋ค.[Table]| Function | ์ค๋ช
||:------------------------|:------------------------------------------|| getUsingProtocol | ํ๋กํ ์ฝ๋ก ์ฌ์ฉํ ๋ฌธ์์ด์ ์ค์ ํฉ๋๋ค. || getCommunicationHeaders | ํต์ ์ ์ฟ ํค์ ์ ๋ณด๋ฅผ ์ถ๊ฐ๋ก ์ค์ ํฉ๋๋ค. |getCommunicationHeaders ํจ์๋ ์๋์ ๊ฐ์ด ์ค์ ํ ์ ์์ต๋๋ค.nexacro.basicPtAdp.prototype.getCommunicationHeaders = function (strUrl){ var ret = nexacro.ProtocolAdp.prototype.getCommunicationHeaders.call(this, strUrl); ret.push({id:"PHPSESSID", value:"298zf09hf012fh2"}); ret.push({id:"csrftoken", value:"u32t4o3tb3gg43"}); return ret;};ํต์ ์ ์ฟ ํค ์ ๋ณด๊ฐ ์ถ๊ฐ๋ก ์ค์ ๋ ๊ฒ์ ํ์ธํ ์ ์์ต๋๋ค.### ๋ฉ์๋๋ก ์ถ๊ฐํ๋ ํจ์Project Explorer์์ ์ค๋ธ์ ํธ๋ฅผ ์ ํํ๊ณ ์ปจํ
์คํธ ๋ฉ๋ด์์ Method๋ฅผ ์ถ๊ฐํด ์ค์ ํฉ๋๋ค.[Table]| Function | ์ค๋ช
||:--------------|:-------------------------------------------------------------------------------------------------|| getHTTPHeader | HTTP ํค๋๊ฐ์ ์ค์ ํฉ๋๋ค. ์ํ๋ ํค๋๊ฐ์ id, value ๊ฐ์ ์ง์ ํ ์ ์์ต๋๋ค. || version | getHTTPHeader ํจ์๋ฅผ ์ฌ์ฉํ๊ธฐ ์ํด์๋ "1.1"๋ณด๋ค ํฐ ๊ฐ์ผ๋ก version ํจ์๋ฅผ ์ค์ ํด์ฃผ์ด์ผ ํฉ๋๋ค. |getHTTPHeader, version ํจ์๋ ์๋์ ๊ฐ์ด ์ค์ ํ ์ ์์ต๋๋ค.nexacro.basicPtAdp.prototype.initialize = function() { this._httpheaders = []; this._httpheaders.push({ id: "Accept", value: "application/json, text/json, */*"});}; nexacro.basicPtAdp.prototype.version = function (){ return "1.1";}; nexacro.basicPtAdp.prototype.getHTTPHeader = function (){ return this._httpheaders;};ํต์ ์ ํค๋ Accept ์ ๋ณด๊ฐ ๋ณ๊ฒฝ๋ ๊ฒ์ ํ์ธํ ์ ์์ต๋๋ค.<|eot_id|>
|
<|begin_of_text|>๋ฅ์ฌํฌ๋ก ๊ฐ์ด๋ ๋ถ(์์ฉ๊ฐ๋ฐ ๊ฐ์ด๋) title: X-PUSH ์ฑ ๊ฐ๋ฐํ๊ธฐ contents: X-PUSH๋ ์ค์๊ฐ์ผ๋ก ์ ๋ณด๋ ๋ฉ์์ง๋ฅผ ์ ๋ฌํ ์ ์๋ Server push ๊ธฐ์ ์ ์ฌ์ฉํ๋ ์ ํ์
๋๋ค. ๋ฅ์ฌํฌ๋ก๋ X-PUSH ์๋ฒ์์ ์ ์กํ๋ ๋ฉ์์ง๋ฅผ ์ฒ๋ฆฌํ ์ ์๋ XPush ์ค๋ธ์ ํธ๋ฅผ ์ ๊ณตํฉ๋๋ค. ๊ฐ๋จํ ์ค์ ๋ง์ผ๋ก ๋ฉ์์ง๋ฅผ ์์ฒญํ๊ณ ์ฒ๋ฆฌํ ์ ์์ต๋๋ค. ์ด๋ฒ ์ฅ์์๋ ๋ฅ์ฌํฌ๋ก ์คํ๋์ค์์ XPush ์ค๋ธ์ ํธ๋ฅผ ๋ฑ๋กํ๊ณ ๋ฉ์์ง๋ฅผ ์ฒ๋ฆฌํ๋ ์ฑ์ ๊ตฌํํ๋ ๊ณผ์ ์ ์ดํด๋ด
๋๋ค.## ํ๋ก์ ํธ์์ ์ฌ์ฉํ XPush ์ค๋ธ์ ํธ ๋ฑ๋กํ๊ธฐXPush ์ค๋ธ์ ํธ๋ ๊ธฐ๋ณธ ์ค๋ธ์ ํธ๋ก ๋ฑ๋ก๋์ด ์์ง ์์ต๋๋ค. Project Explorer ์ฐฝ์์ XPush ์ค๋ธ์ ํธ๋ฅผ ๋ฑ๋กํ ํ ์ฌ์ฉํ ์ ์์ต๋๋ค.๋จ๊ณ 1. ๋ฉ๋ด[File > New > Project]๋ฅผ ์ ํํ๊ณ ์๋ก์ด ํ๋ก์ ํธ๋ฅผ ์์ฑํฉ๋๋ค.๋จ๊ณ 2. Project Explorer ์ฐฝ์์ [TypeDefinition > Objects] ํญ๋ชฉ์ ์ ํํฉ๋๋ค. Module์ ์ถ๊ฐํ ์ ์๋ ์ฐฝ์ด ๋ํ๋ฉ๋๋ค.๋จ๊ณ 3. Modules ํญ๋ชฉ์์ [+] ๋ฒํผ์ ํด๋ฆญํฉ๋๋ค. ํ์ผ ํ์๊ธฐ๊ฐ ๋ํ๋๋ฉด "Push.json" ํ์ผ์ ์ ํํฉ๋๋ค.๋จ๊ณ 4. Modules ๋ชฉ๋ก์ Push.json ํญ๋ชฉ์ด ์ถ๊ฐ๋ ๊ฒ์ ํ์ธํ๊ณ nexacro.XPush ํญ๋ชฉ ์์ ์๋ [+] ๋ฒํผ์ ํด๋ฆญํด XPush ์ค๋ธ์ ํธ๋ฅผ Objects ๋ชฉ๋ก์ ์ถ๊ฐํฉ๋๋ค.๋จ๊ณ 5. Objects ๋ชฉ๋ก์ XPush ์ค๋ธ์ ํธ๊ฐ ์ถ๊ฐ๋ ๊ฒ์ ํ์ธํ๊ณ [OK] ๋ฒํผ์ ํด๋ฆญํด ์ฐฝ์ ๋ซ์ต๋๋ค. XPush ์ค๋ธ์ ํธ๋ฅผ ์ถ๊ฐํ๋ฉด์ ๋ณ๊ฒฝ๋ ์ค์ ์ ๋ฐ์ํ๊ธฐ ์ํด ํ๋ก์ ํธ๋ฅผ ์๋ก ๋ก๋ฉํฉ๋๋ค.## ์ค์๊ฐ ๋ฉ์์ง๋ฅผ Grid ์ปดํฌ๋ํธ์ ํ์ํ๊ธฐXPush ์ค๋ธ์ ํธ๋ฅผ ์ถ๊ฐํด์ X-PUSH ์๋ฒ์์ ์ค์๊ฐ์ผ๋ก ์ ์ก๋๋ ๋ฉ์์ง๋ฅผ ์์ ํ๊ณ ์์ ๋ ๋ฉ์์ง๋ฅผ Grid ์ปดํฌ๋ํธ์ ํ์ํฉ๋๋ค.๋
ธํธ:์ค์๊ฐ ๋ฉ์์ง๋ฅผ ์์ ํ๊ธฐ ์ํด์๋ X-PUSH ์๋ฒ๊ฐ ๋์ํ๊ณ ์์ผ๋ฉฐ ๋ฉ์์ง ๊ณต๊ธ์(Message Provider) ์๋น์ค๊ฐ ์คํ๋ ์ํ์ฌ์ผ ํฉ๋๋ค. ๋ฉ์์ง ์ ์ก์ run_provider_demo_Push.bat ํ์ผ ์คํ ์ ์ ์กํ๋ฉฐ ์คํ์ ๋ฉ์ถ ๋๊น์ง ๊ณ์ ์ ์กํฉ๋๋ค.๋จ๊ณ 1. ๋ฉ๋ด[File > New > Form]๋ฅผ ์ ํํ๊ณ ์๋ก์ด Form ํ๋ฉด์ ์์ฑํฉ๋๋ค.๋จ๊ณ 2. Form ํ๋ฉด์ Grid ์ปดํฌ๋ํธ์ Dataset ์ค๋ธ์ ํธ๋ฅผ ์ถ๊ฐํฉ๋๋ค.๋จ๊ณ 3. Dataset Editor์์ Dataset ์ค๋ธ์ ํธ์ ์ปฌ๋ผ ์์ฑ์ ์๋์ ๊ฐ์ด ์ค์ ํ๊ณ Grid ์ปดํฌ๋ํธ์ ๋ฐ์ธ๋ฉํฉ๋๋ค.๋
ธํธ:Dataset ์ค๋ธ์ ํธ์ ์ปฌ๋ผ ์์ฑ์ layouturl ์์ฑ๊ฐ์ผ๋ก ์ง์ ํ๋ ๋ฉ์์ง ๋ ์ด์์ XML ํ์ผ์ ์ ์๋ id ๊ฐ์ด ๊ฐ์์ผ ํฉ๋๋ค....<message type="OPDT"> <field id="id" type="string" size="9"/> <field id="content" type="string" size="255"/></message>...๋จ๊ณ 4. ์ปดํฌ๋ํธ ํด๋ฐ์์ XPush ์ค๋ธ์ ํธ๋ฅผ ํ์ธํ๊ณ ๋ง์ฐ์ค ๋๋๊ทธ์ค๋๋กญ ๋์์ผ๋ก Form ํ๋ฉด์ XPush ์ค๋ธ์ ํธ๋ฅผ ์ถ๊ฐํฉ๋๋ค. XPush ์ค๋ธ์ ํธ๋ Dataset ์ค๋ธ์ ํธ์ฒ๋ผ Invisible Object ์์ญ์ ์ถ๊ฐ๋ฉ๋๋ค.๋จ๊ณ 5. XPush ์ค๋ธ์ ํธ๋ฅผ ์ ํํ๊ณ ์์ฑ์ฐฝ์์ layouturl, iplist ์์ฑ๊ฐ์ ์ง์ ํฉ๋๋ค. layouturl ์์ฑ๊ฐ์ ์ ์๋ ๋ฉ์์ง ๋ ์ด์์ XML ํ์ผ์ URL๊ฐ์ ์ง์ ํ๊ฑฐ๋ ๋ก์ปฌ ์์น์ ํ์ผ์ ์ง์ ํ ์ ์์ต๋๋ค. iplist ์์ฑ๊ฐ์ X-PUSH ์๋ฒ IP์ PORT ๊ฐ์ ์ง์ ํฉ๋๋ค.์ฃผ์:iplist ์์ฑ๊ฐ์ TCP ํต์ (NRE)๊ณผ HTTP ํต์ (์น๋ธ๋ผ์ฐ์ ) ์ค ํ๋๋ฅผ ์ ํํ ์ ์์ต๋๋ค.TCP ํต์ ๋ฐฉ์์ ์ง์ ํ๋ ๊ฒฝ์ฐ์๋ PORT ๋ฒํธ๋ฅผ 10081๋ก ์ง์ ํฉ๋๋ค.HTTP ํต์ ๋ฐฉ์์ ์ง์ ํ๋ ๊ฒฝ์ฐ์๋ PORT ๋ฒํธ๋ฅผ 10080์ผ๋ก ์ง์ ํฉ๋๋ค.NRE์ ์น๋ธ๋ผ์ฐ์ ๋ชจ๋ ์๋น์คํด์ผ ํ๋ ๊ฒฝ์ฐ์๋ iplist ์์ฑ๊ฐ์ ๋ ๊ฐ์ง PORT ์ค์ ์ ๋ชจ๋ ์ง์ ํด์ผ ํฉ๋๋ค.iplist="http://localhost:10080, localhost:10081"๋จ๊ณ 6. Form ์ค๋ธ์ ํธ์ onload ์ด๋ฒคํธ ํจ์๋ฅผ ์๋์ ๊ฐ์ด ์ถ๊ฐํฉ๋๋ค. onload ์ด๋ฒคํธ ํจ์์์๋ X-PUSH ์๋ฒ์ ์ฐ๊ฒฐ์ ์๋ํฉ๋๋ค.this.Form_Work_onload = function(obj:nexacro.Form,e:nexacro.LoadEventInfo){ this.XPush00.connect("user00", "password");};๋จ๊ณ 7. XPush ์ค๋ธ์ ํธ์ onsuccess ์ด๋ฒคํธ ํจ์๋ฅผ ์๋์ ๊ฐ์ด ์ถ๊ฐํฉ๋๋ค. ์ฐ๊ฒฐ์ด ์ฑ๊ณตํ ๊ฒฝ์ฐ์ ๋ฉ์์ง ์์ ์ ์ํด subscribe ๋ฉ์๋๋ฅผ ์คํํฉ๋๋ค. ์ค์๊ฐ์ผ๋ก ๋ฉ์์ง๋ฅผ ์์ ํด์ Dataset ์ค๋ธ์ ํธ์ ๋ฉ์์ง ๋ฐ์ดํฐ๋ฅผ ์ถ๊ฐํฉ๋๋ค. ์ถ๊ฐ๋ ๋ฉ์์ง๋ Grid ์ปดํฌ๋ํธ๋ฅผ ํตํด ํ์๋ฉ๋๋ค.this.XPush00_onsuccess = function(obj:nexacro.XPush,e:nexacro.XPushEventInfo){ if(e.action == nexacro.XPushAction.AUTH) // 0 { this.XPush00.subscribe("OPDT", "ALL", this, this.Dataset00, "append", "fn_PushCallback"); }};this.fn_PushCallback = function(Row,ChangeColumn,AllColumn,Type,ActionType){ trace(Row,ChangeColumn,AllColumn,Type,ActionType);}๋จ๊ณ 8. XPush ์ค๋ธ์ ํธ์ onerror ์ด๋ฒคํธ ํจ์๋ฅผ ์๋์ ๊ฐ์ด ์ถ๊ฐํฉ๋๋ค. ์ฐ๊ฒฐ์ด ์คํจํ ๊ฒฝ์ฐ์๋ ์์ธ์ ํ์ธํ ์ ์์ต๋๋ค.this.XPush00_onerror = function(obj:nexacro.XPush,e:nexacro.XPushErrorEventInfo){ trace(e.errormsg, e.statuscode);};๋จ๊ณ 9. ์ฑ์ ์คํํ๋ฉด onload ์ด๋ฒคํธ ํจ์ ๋ด์์ X-PUSH ์๋ฒ์ ์ฐ๊ฒฐํ๊ณ ์ ์ก๋๋ ๋ฉ์์ง๋ฅผ ์์ ํ๊ธฐ ์์ํฉ๋๋ค. ์ค์๊ฐ์ผ๋ก ์์ ๋ ๋ฉ์์ง๊ฐ Grid ์ปดํฌ๋ํธ์ ํ์๋๋ ๊ฒ์ ํ์ธํฉ๋๋ค.## ์ ๋ขฐ์ฑ ๋ฉ์์ง ์ฒ๋ฆฌํ๊ธฐ๋
ธํธ:Form ํ๋ฉด์ ์์ฑํ๊ณ XPush ์ค๋ธ์ ํธ๋ฅผ ์ด๊ธฐํํ๋ ๊ณผ์ ์ ์ค์๊ฐ ๋ฉ์์ง๋ฅผ Grid ์ปดํฌ๋ํธ์ ํ์ํ๊ธฐ์ ๊ฐ์ต๋๋ค. onload ์ด๋ฒคํธ ํจ์์์ ๋ฌ๋ผ์ง๋ ๋ถ๋ถ๋ถํฐ ์ค๋ช
ํฉ๋๋ค.๋
ธํธ:์ ๋ขฐ์ฑ ๋ฉ์์ง๋ฅผ ์์ ํ๊ธฐ ์ํด์๋ X-PUSH ์๋ฒ๊ฐ ๋์ํ๊ณ ์์ผ๋ฉฐ ๋ฉ์์ง ๊ณต๊ธ์(Message Provider) ์๋น์ค๊ฐ ์คํ๋ ์ํ์ฌ์ผ ํฉ๋๋ค. ๋ฉ์์ง ์ ์ก์ run_provider_demo_Reli.bat ํ์ผ ์คํ ์ ํ๋์ ๋ฉ์์ง๋ฅผ ์ ์กํฉ๋๋ค.### ์ ๋ขฐ์ฑ ๋ฉ์์ง ์์ ์ ์ํด ํ ํฝ ๋ฑ๋กํ๊ธฐ์ ๋ขฐ์ฑ ๋ฉ์์ง(Reliable messaging)๋ ์ฌ์ฉ์์๊ฒ ๋ฉ์์ง๋ฅผ ์ ๋ฌํ๋ ๊ฒ์ ๋ณด์ฅํ๋ ๊ฒ์ ์๋ฏธํฉ๋๋ค. ์ค์๊ฐ ๋ฉ์์ง๋ ๋ฉ์์ง๋ฅผ ์ ์กํ๊ณ ์ฌ์ฉ์๊ฐ ๋ฉ์์ง๋ฅผ ์์ ํ๋์ง ์ฌ๋ถ๋ฅผ ํ์ธํ์ง ์์ต๋๋ค. ๋ง์น ๋ผ๋์ค ๋ฐฉ์ก์ฒ๋ผ ๊ณ์ ๋ฉ์์ง๋ฅผ ์ ๋ฌํ๊ณ ์ฌ์ฉ์๊ฐ ์ด๋ฅผ ์์ ํ๋ ๊ฒ์
๋๋ค. ํ์ง๋ง ์ ๋ขฐ์ฑ ๋ฉ์์ง๋ ํน์ ์ฌ์ฉ์์๊ฒ ๋ณด๋ด๋ ์์ฑ ๋ฉ์์ง์ ๋น์ทํฉ๋๋ค. ๋ฉ์์ง๋ฅผ ์ ์กํ๋ ์์ ์ ํ์ธํ์ง ๋ชปํ๋๋ผ๋ ๋์ค์ ํ์ธํ ์ ์๋๋ก ๋ณด์ฅํ๋ ๊ฒ์
๋๋ค.์ ๋ขฐ์ฑ ๋ฉ์์ง๋ฅผ ์ฒ๋ฆฌํ๊ธฐ ์ํด์๋ ์ด๋ค ์ฌ์ฉ์๊ฐ ์ด๋ค ๋ฉ์์ง๋ฅผ ์์ ํ ๊ฒ์ธ์ง ๋ฏธ๋ฆฌ ์ฝ์๋์ด ์์ด์ผ ํฉ๋๋ค. ํ ํฝ ๋ฑ๋กํ๊ธฐ๋ฅผ ํตํด ๋ฐ์ดํฐ๋ฒ ์ด์ค์ ๊ด๋ จ ์ ๋ณด๋ฅผ ๋ฑ๋กํฉ๋๋ค.๋จ๊ณ 1. Form ์ค๋ธ์ ํธ์ onload ์ด๋ฒคํธ ํจ์๋ฅผ ์๋์ ๊ฐ์ด ์ถ๊ฐํฉ๋๋ค. onload ์ด๋ฒคํธ ํจ์์์๋ X-PUSH ์๋ฒ์ ์ฐ๊ฒฐ์ ์๋ํฉ๋๋ค.this.Form_Work_onload = function(obj:nexacro.Form,e:nexacro.LoadEventInfo){ this.XPush00.connect("user00", "password");}๋จ๊ณ 2. XPush ์ค๋ธ์ ํธ์ onsuccess ์ด๋ฒคํธ ํจ์๋ฅผ ์๋์ ๊ฐ์ด ์ถ๊ฐํฉ๋๋ค. ์ฐ๊ฒฐ์ด ์ฑ๊ณตํ ๊ฒฝ์ฐ์ ๋ฉ์์ง ์์ ์ ์ํด subscribe ๋ฉ์๋๋ฅผ ์คํํฉ๋๋ค. ์ค์๊ฐ์ผ๋ก ๋ฉ์์ง๋ฅผ ์์ ํด์ Dataset ์ค๋ธ์ ํธ์ ๋ฉ์์ง ๋ฐ์ดํฐ๋ฅผ ์ถ๊ฐํฉ๋๋ค. ์ถ๊ฐ๋ ๋ฉ์์ง๋ Grid ์ปดํฌ๋ํธ๋ฅผ ํตํด ํ์๋ฉ๋๋ค.this.XPush00_onsuccess = function(obj:nexacro.XPush,e:nexacro.XPushEventInfo){ if(e.action == nexacro.XPushAction.AUTH) // 0 { this.XPush00.subscribe("NOTI", "ALL", this, this.Dataset00, "append", "fn_PushCallback"); }};๋จ๊ณ 3. Form ํ๋ฉด์ Button ์ปดํฌ๋ํธ๋ฅผ ์ถ๊ฐํ๊ณ Button ์ปดํฌ๋ํธ์ onclick ์ด๋ฒคํธ ํจ์๋ฅผ ์๋์ ๊ฐ์ด ์ถ๊ฐํฉ๋๋ค. connect ๋ฉ์๋ ์คํ ์ ์ฌ์ฉํ userid๋ก ํ ํฝ์ ๋ฑ๋กํฉ๋๋ค. ํ ํฝ ๋ฑ๋ก์ ํ ๋ฒ๋ง ์คํํฉ๋๋ค.this.Button00_onclick = function(obj:nexacro.Button,e:nexacro.ClickEventInfo){ this.XPush00.registerTopic("NOTI", "ALL");};๋จ๊ณ 4. XPush ์ค๋ธ์ ํธ์ onerror ์ด๋ฒคํธ ํจ์๋ฅผ ์๋์ ๊ฐ์ด ์ถ๊ฐํฉ๋๋ค. ํ ํฝ ๋ฑ๋ก์ด ์คํจํ๊ฑฐ๋ ์ด๋ฏธ ๋ฑ๋ก๋ ํ ํฝ์ด ์๋ ๊ฒฝ์ฐ์๋ ์คํจ ์์ธ์ ํ์ธํ ์ ์์ต๋๋ค.this.XPush00_onerror = function(obj:nexacro.XPush,e:nexacro.XPushErrorEventInfo){ trace(e.errormsg, e.statuscode);};๋จ๊ณ 5. ํ ํฝ์ด ๋ฑ๋ก๋๋ฉด ์ ๋ขฐ์ฑ ๋ฉ์์ง๋ฅผ ์์ ํ ์ ์์ต๋๋ค. ๋ฐ์ดํฐ๋ฒ ์ด์ค T_TOPIC ํ
์ด๋ธ์์ ๋ฑ๋ก๋ ํ ํฝ์ ํ์ธํ ์ ์์ต๋๋ค.### ์ ๋ขฐ์ฑ ๋ฉ์์ง ์์ ํ๊ธฐ์ฑ์ด ์คํ๋์ง ์์ ์ํ์์ ๋ฉ์์ง๊ฐ ์ ์ก๋๋ฉด ํด๋น ๋ฉ์์ง๋ ๋ฐ์ดํฐ๋ฒ ์ด์ค T_USER_MESSAGE ํ
์ด๋ธ์ ์ ์ฅ๋ฉ๋๋ค. MESSAGE_STATE ์ปฌ๋ผ๊ฐ์ด 0์ด๋ฉด ์ฌ์ฉ์์๊ฒ ๋ฉ์์ง๊ฐ ์ ๋ฌ๋์ง ์์ ์ํ์
๋๋ค.๋จ๊ณ 1. Form ํ๋ฉด์ Button ์ปดํฌ๋ํธ๋ฅผ ์ถ๊ฐํ๊ณ Button ์ปดํฌ๋ํธ์ onclick ์ด๋ฒคํธ ํจ์๋ฅผ ์๋์ ๊ฐ์ด ์ถ๊ฐํฉ๋๋ค. connect ๋ฉ์๋ ์คํ ์ ์ฌ์ฉํ userid๋ก ๋ฏธ์์ ๋ ๋ฉ์์ง๊ฐ ์๋์ง ํ์ธํ๊ณ ๋ฉ์์ง๋ฅผ ์์ ํฉ๋๋ค. ์๋ฒ์์ ๋ฏธ์์ ๋ ๋ฉ์์ง๋ฅผ ์ ์กํ๊ณ ๋๋ฉด MESSAGE_STATE ์ปฌ๋ผ๊ฐ์ด 1๋ก ๋ณ๊ฒฝ๋ฉ๋๋ค.this.Button01_onclick = function(obj:nexacro.Button,e:nexacro.ClickEventInfo){ this.XPush00.requestMessage("NOTI", "ALL");};๋จ๊ณ 2. requestMessage ๋ฉ์๋๋ ๋ณ๋์ ์ฝ๋ฐฑํจ์๋ฅผ ์ง์ ํ์ง ์๊ณ subscribe ๋ฉ์๋ ์คํ ์ ์ง์ ํ ์ฝ๋ฐฑํจ์๋ฅผ ์ฌ์ฉํฉ๋๋ค. requestMessage ๋ฉ์๋๋ฅผ ์คํํด ๋ฏธ์์ ๋ ๋ฉ์์ง๋ฅผ ์์ ํ๋ฉด sendResponse ๋ฉ์๋๋ฅผ ์คํํด ํด๋น ๋ฉ์์ง ์์ ์ ๋ํ ์๋ต์ ๋ณด๋ผ ์ ์์ต๋๋ค. ์๋ฒ์์ ์๋ต์ ์์ ํ๋ฉด MESSAGE_STATE ์ปฌ๋ผ๊ฐ์ด 2๋ก ๋ณ๊ฒฝ๋ฉ๋๋ค.this.fn_PushCallback = function(Row,ChangeColumn,AllColumn,Type,ActionType,MessageId){ trace(Row,ChangeColumn,AllColumn,Type,ActionType,MessageId); if(ActionType=="RELI") this.XPush00.sendResponse(MessageId);}### ๋ฑ๋ก๋ ํ ํฝ ์ทจ์ํ๊ธฐ๋ ์ด์ ํด๋น ๋ฉ์์ง๋ฅผ ์์ ํ ํ์๊ฐ ์๋ค๋ฉด ๋ฑ๋ก๋ ํ ํฝ์ ์ทจ์ํด์ฃผ์ด์ผ ํฉ๋๋ค. unregisterTopic ๋ฉ์๋๋ฅผ ์ฌ์ฉํด ๋ฑ๋ก๋ ํ ํฝ์ ์ทจ์ํ ์ ์์ต๋๋ค.๋จ๊ณ 1. Form ํ๋ฉด์ Button ์ปดํฌ๋ํธ๋ฅผ ์ถ๊ฐํ๊ณ Button ์ปดํฌ๋ํธ์ onclick ์ด๋ฒคํธ ํจ์๋ฅผ ์๋์ ๊ฐ์ด ์ถ๊ฐํฉ๋๋ค. connect ๋ฉ์๋ ์คํ ์ ์ฌ์ฉํ userid๋ก ํ ํฝ์ ๋ฑ๋กํ ํ ํฝ์ ์ทจ์ํฉ๋๋ค.this.Button02_onclick = function(obj:nexacro.Button,e:nexacro.ClickEventInfo){ this.XPush00.unregisterTopic("NOTI", "ALL");};๋จ๊ณ 2. ๋ฑ๋ก๋ ํ ํฝ์ ์ทจ์ํ๋ฉด ์ ๋ขฐ์ฑ ๋ฉ์์ง๋ฅผ ์์ ํ ์ ์์ต๋๋ค. ๋ฐ์ดํฐ๋ฒ ์ด์ค T_TOPIC ํ
์ด๋ธ์์ ๋ฑ๋ก๋ ํ ํฝ ํญ๋ชฉ ์ค ACTIVE ์ปฌ๋ผ๊ฐ์ด "N"์ผ๋ก ๋ณ๊ฒฝ๋ ๊ฒ์ ํ์ธํ ์ ์์ต๋๋ค.<|eot_id|>
|
<|begin_of_text|>๋ฅ์ฌํฌ๋ก ๊ฐ์ด๋ ๋ถ(์์ฉ๊ฐ๋ฐ ๊ฐ์ด๋) title: ์์ ฏ ์ฑ ๊ฐ๋ฐํ๊ธฐ contents: ์์ ฏ์ ์๊ณ๋ CPU ํํฉ ๊ฐ์ ์ค์๊ฐ ์ ๋ณด๋ฅผ ๋ชจ๋ํฐ๋งํ๊ธฐ ์ํ ์ฉ๋๋ก ํ๋ฉด์ ํญ์ ๋์๋๋ ์์ UI ๋๊ตฌ์
๋๋ค. ๋ฅ์ฌํฌ๋ก์์๋ ํฌ๋ช
ํ ๋ ์ด์ด๋ฅผ ๊ฐ์ง๋ ์ ์ฐฝ์ ๋์ฐ๋ ๋ฐฉ์์ผ๋ก ์์ ฏ UI๋ฅผ ๊ตฌํํ ์ ์์ต๋๋ค.## ๊ฐ๋จํ ๋ฌ๋ ฅ ์์ ฏ ๋ง๋ค๊ธฐ๋จ๊ณ 1. ์๋ก์ด ํ๋ก์ ํธ๋ฅผ ์์ฑํฉ๋๋ค. Frameset Template์์ Full ํ์
์ ์ ํํฉ๋๋ค.๋จ๊ณ 2. Form_Work ํผ์ Button ์ปดํฌ๋ํธ๋ฅผ ์ถ๊ฐํ๊ณ ์๋์ ๊ฐ์ด onclick ์ด๋ฒคํธ ํจ์๋ฅผ ์์ฑํฉ๋๋ค.layered ์์ฑ์ ChildFrame ์์ฑ ์ ๋ฐฐ๊ฒฝ ์๋์ฐ๋ฅผ ํฌ๋ช
ํ๊ฒ ์ค์ ํ๋ ์์ฑ์
๋๋ค. ์ด ์์ฑ๊ฐ์ true๋ก ์ค์ ํ๋ฉด ์ํ๋ ๋ชจ์์ ๋ฐฐ๊ฒฝ ์ด๋ฏธ์ง๋ฅผ ํ๋ฉด์ ํํํ ์ ์์ต๋๋ค.this.Button00_onclick = function(obj:nexacro.Button,e:nexacro.ClickEventInfo){ nexacro.open("NewWidget", "FrameBase::WidgetMain1.xfdl", this.getOwnerFrame(), "", "showontaskbar=false showtitlebar=false showstatusbar=false topmost=true layered=true", 0, 0);};WidgetMain1.xfdl ํผ์ ์์ ฏ ํํ๋ก ๋ณด์ผ ํผ์
๋๋ค. ์์ ฏ ํํ๋ก ํ์ํ UI๋ง ๋
ธ์ถํ๊ธฐ ๋๋ฌธ์ OpenStyle ํ๋ผ๋ฏธํฐ ์ค์ ์์ ํ์คํฌ๋ฐ๋ ํ์ดํ๋ฐ, ์ํํ์๋ฐ๋ ๋ณด์ด์ง ์๊ฒ ์ฒ๋ฆฌํฉ๋๋ค. ๊ทธ๋ฆฌ๊ณ ๋ค๋ฅธ ํ๋ก๊ทธ๋จ์ ๊ฐ๋ฆฌ์ง ์๋๋ก topmost ์์ฑ๊ฐ์ true๋ก ์ง์ ํฉ๋๋ค.๋จ๊ณ 3. WidgetMain1 ๋ผ๋ ์ด๋ฆ์ผ๋ก ์๋ก์ด Form ์ค๋ธ์ ํธ๋ฅผ ์์ฑํฉ๋๋ค.๋จ๊ณ 4. ResourceExplorer ํญ์ ์ ํํ๊ณ ์ปจํ
์คํธ ๋ฉ๋ด์์ 'Import'๋ฅผ ์ ํํฉ๋๋ค.๋ฐฐ๊ฒฝ ์ด๋ฏธ์ง๋ก ์ฌ์ฉํ ํฌ๋ช
ํ ์ด๋ฏธ์ง ํ์ผ์ ๊ฐ์ ธ์ต๋๋ค. ์๋ฅผ ๋ค์ด ์ ํํ์ ์ด๋ฏธ์ง๋ผ๋ฉด ์ ๋ชจ์๋ง ๋ณด์ฌ์ง๊ณ ๋ฐํ ์์ญ์ ํฌ๋ช
ํ๊ฒ ๋ณด์ฌ์ง๋๋ค. ์์ ์์๋ ์๋ ์ด๋ฏธ์ง๋ฅผ ์ฌ์ฉํ์ต๋๋ค.https://pixabay.com/en/book-character-glasses-show-1773756/๋จ๊ณ 5. Form ์ค๋ธ์ ํธ์ background ์์ฑ์์ imageurl ์์ฑ๊ฐ์ผ๋ก ํฌ๋ช
์ด๋ฏธ์ง ํ์ผ์ ์ ํํ๊ณ background-color ์์ฑ๊ฐ์ transparent๋ก ์ค์ ํฉ๋๋ค.๋จ๊ณ 6. ํฌ๋ช
์ด๋ฏธ์ง ํ์ผ์ ๋ง๊ฒ Form ์ค๋ธ์ ํธ์ ํฌ๊ธฐ๋ฅผ ์กฐ์ ํ๊ณ Calendar ์ปดํฌ๋ํธ๋ฅผ ์ ์ ํ ์์น์ ๋ฐฐ์นํฉ๋๋ค.๋จ๊ณ 7. ํด๋ฐ์์ ์คํ์ต์
์ผ๋ก NRE๋ฅผ ์ ํํ๊ณ Launch ์์ด์ฝ์ ํด๋ฆญํ๊ฑฐ๋ ๋จ์ถํค (Ctrl + F5)๋ฅผ ์
๋ ฅํ๊ณ ์ฑ์ ์คํํฉ๋๋ค.์ฃผ์:Launch ์คํ ์ NRE ์ด์ธ์ ์น๋ธ๋ผ์ฐ์ ์์๋ ์์ ฏ ๊ธฐ๋ฅ์ ์ฌ์ฉํ ์ ์์ต๋๋ค.๋จ๊ณ 8. ์ฑ์์ ๋ฒํผ์ ํด๋ฆญํ๋ฉด WidgetMain1 ์ผ๋ก ๋ง๋ ์์ ฏ UI๊ฐ ํ๋ฉด์ ํ์๋ฉ๋๋ค.๋จ๊ณ 9. ํฌ๋ช
ํ์ง ์์ ๋ฐฐ๊ฒฝ ์ด๋ฏธ์ง ์์ญ์ ๋ง์ฐ์ค๋ก ๋๋๊ทธํ๋ฉด ์ํ๋ ์์น๋ก ์ด๋ํ ์ ์์ต๋๋ค.์ฃผ์:ํฌ๋ช
ํ ๋ฐฐ๊ฒฝ ์์ญ ํด๋ฆญ ์์๋ ๋ค์ ๋ณด์ฌ์ง๋ ์๋์ฐ์ ํฌ์ปค์ค๊ฐ ์ด๋ํ๊ธฐ ๋๋ฌธ์ ๋ง์ฐ์ค๋ก ๋๋๊ทธํด์ ์์ ฏ ์์น๋ฅผ ๋ณ๊ฒฝํ ์ ์์ต๋๋ค.๊ฐ๋ณ ์ปดํฌ๋ํธ ํด๋ฆญ ์์๋ ๊ฐ๋ณ ์ปดํฌ๋ํธ ๋์์ ํด์ผ ํ๊ธฐ ๋๋ฌธ์ ๋ง์ฐ์ค๋ก ๋๋๊ทธํด์ ์์ ฏ ์์น๋ฅผ ๋ณ๊ฒฝํ ์ ์์ต๋๋ค.## ๋ฐ๋ก ์คํ๋๋ ์์ ฏ ๋ง๋ค๊ธฐ์ด์ ์์ ์์๋ ๋ฉ์ธ ํผ์ ์คํํ๊ณ ๋ฒํผ ํด๋ฆญ ์ ์์ ฏ UI๊ฐ ๋ํ๋ฌ์ต๋๋ค. ์ด๋ฒ ์์ ์์๋ ์ฌ์ฉ์์ ์
๋ ฅ ์์ด ๋ฐ๋ก ์คํ๋๋(๊ฒ ์ฒ๋ผ ๋ณด์ด๋) ์์ ฏ์ ๋ง๋ค์ด๋ด
๋๋ค.๋จ๊ณ 1. ์ด์ ์์ ์์ ์ฌ์ฉํ Form_Work ํผ์ ์๋์ ๊ฐ์ด oninit ์ด๋ฒคํธ ํจ์๋ฅผ ์์ฑํฉ๋๋ค.this.Form_Work_oninit = function(obj:nexacro.Form,e:nexacro.EventInfo){ nexacro.getApplication().mainframe.set_visible(false); nexacro.open("NewWidget", "FrameBase::WidgetMain1.xfdl", this.getOwnerFrame(), "", "showontaskbar=false showtitlebar=false showstatusbar=false topmost=true layered=true", 0, 0);};๋จ๊ณ 2. ์์ ฏ์ ์ข
๋ฃํ๊ธฐ ์ํ Button ์ปดํฌ๋ํธ๋ฅผ ์์ ฏ ํผ(WidgetMain1)์ ์ถ๊ฐํฉ๋๋ค.์ด์ ์์ ์์๋ ๋ฉ์ธ ํผ์ ๋ซ์ผ๋ฉด ์์ ฏ์ด ๊ฐ์ด ์ข
๋ฃ๋๋๋ฐ, ์์ ฏ์๋ ํ์ดํ๋ฐ๊ฐ ํ์๋์ง ์์์ ๋ซ๊ธฐ ๋ฒํผ์ ๋ฐ๋ก ๋ง๋ค์ด์ฃผ์ด์ผ ํฉ๋๋ค.๋จ๊ณ 3. Button ์ปดํฌ๋ํธ๋ฅผ ์ถ๊ฐํ๊ณ ์๋์ ๊ฐ์ด onclick ์ด๋ฒคํธ ํจ์๋ฅผ ์์ฑํฉ๋๋ค.this.Button00_onclick = function(obj:nexacro.Button,e:nexacro.ClickEventInfo){ this.close();};๋จ๊ณ 4. ํด๋ฐ์์ ์คํ์ต์
์ผ๋ก NRE๋ฅผ ์ ํํ๊ณ Launch ์์ด์ฝ์ ํด๋ฆญํ๊ฑฐ๋ ๋จ์ถํค (Ctrl + F5)๋ฅผ ์
๋ ฅํ๊ณ ์ฑ์ ์คํํฉ๋๋ค.์ฑ์ด ์คํ๋๋ฉด์ ๋ฉ์ธํ๋ ์์ ๋ณด์ด์ง ์๊ฒ ํ๋ฉด์ open ๋ฉ์๋๊ฐ ์คํ๋๊ธฐ ๋๋ฌธ์ ์์ ฏ UI๋ง ํ๋ฉด์ ํ์๋ฉ๋๋ค. [CLOSE] ๋ฒํผ์ ํด๋ฆญํ๋ฉด ์์ ฏ UI๊ฐ ๋ซํ๋๋ค.## ํธ๋ ์ด์์ ์์ ฏ ์ ์ดํ๊ธฐ์์ ฏ์ด ๋ ์์ผ๋ฉด ๋ค๋ฅธ ์์
์ ํ ๋ ๋ฐฉํด๊ฐ ๋ ์ ์์ต๋๋ค. ๊ทธ๋ฐ ๊ฒฝ์ฐ์๋ ์ ์ ์์ ฏ์ ๊ฐ์ถ์ด๋์๋ค๊ฐ ๋ค์ ๋ณด์ด๋๋ก ํ ์ ์์ต๋๋ค. ์ฑ์ ํธ๋ ์ด๋ฅผ ๋ฑ๋กํ๊ณ ํธ๋ ์ด์์ ์์ ฏ์ ์ ์ดํ ์ ์์ต๋๋ค.๋จ๊ณ 1. Project Explorer์์ App์ ์ ํํ๊ณ ์ปจํ
์คํธ ๋ฉ๋ด์์ [Add > Tray] ํญ๋ชฉ์ ์ ํํฉ๋๋ค.๋จ๊ณ 2. ํธ๋ ์ด ์์ด์ฝ์ ์ ํํ๊ณ ์์ฑ์ฐฝ์์ icon, tooltip ์์ฑ๊ฐ์ ์ค์ ํฉ๋๋ค.icon: "application"tooltip: Nexacro Widget Tray๋
ธํธ:icon ์์ฑ๊ฐ์ ๊ธฐ๋ณธ์ผ๋ก ์ ๊ณต๋๋ ์์คํ
์์ด์ฝ์ ์ฌ์ฉํ๊ฑฐ๋ URL ๊ฐ์ ์ค์ ํ ์ ์์ต๋๋ค.๋จ๊ณ 3. onrbuttonup ์ด๋ฒคํธ ํจ์๋ฅผ ์๋์ ๊ฐ์ด ์ถ๊ฐํฉ๋๋ค."PopupMenu00"์ ๋ค์ ๋จ๊ณ์์ ๋ง๋ค PopupMenu ์ปดํฌ๋ํธ id ๊ฐ์
๋๋ค. ํธ๋ ์ด์์ ๋ง์ฐ์ค ์ค๋ฅธ์ชฝ ๋ฒํผ์ ํด๋ฆญํ์ ๋ ๋ฉ๋ด๊ฐ ํ์๋๋๋ก ํฉ๋๋ค.this.Tray0_onrbuttonup = function(obj:nexacro.Tray,e:nexacro.MouseEventInfo){ var pdivWigetMenu = obj.items[obj.findItem("PopupMenu00")]; pdivWigetMenu.trackPopup()};๋จ๊ณ 4. ํธ๋ ์ด ์์ด์ฝ ์๋์ PopupMenu ์ฐฝ์์ ์ถ๊ฐํ๊ธฐ ๋ฒํผ์ ํด๋ฆญํฉ๋๋ค.๋จ๊ณ 5. PopupMenu00 ํญ๋ชฉ์ ์ ํํ๋ฉด ์ค๋ฅธ์ชฝ ์์ฑ์ฐฝ์์ innerdataset์ ์ค์ ํ ์ ์์ต๋๋ค.captioncolumn, idcolumn ํญ๋ชฉ์ "Widget", "Exit"๋ก ์ง์ ํ๊ณ levelcolumn ํญ๋ชฉ์ 0์ผ๋ก ์ง์ ํฉ๋๋ค.๋จ๊ณ 6. ์์ฑ์ฐฝ์์ Event ์์ด์ฝ์ ์ ํํ๋ฉด ์ด๋ฒคํธ ํจ์๋ฅผ ์ถ๊ฐํ ์ ์์ต๋๋ค. onmenuclick ์ด๋ฒคํธ ํจ์๋ฅผ ์๋์ ๊ฐ์ด ์ถ๊ฐํฉ๋๋ค.ํธ๋ ์ด์์ ์ค๋ฅธ์ชฝ ๋ง์ฐ์ค ๋ฒํผ์ ํด๋ฆญํด์ ๋ฉ๋ด๋ฅผ ํ์ํ๊ณ ๋ฉ๋ด ํญ๋ชฉ์ ์ ํํ์ ๋์ ๋์์ ์ง์ ํ๋ ์ฝ๋์
๋๋ค. "Widget" ํญ๋ชฉ์ ์ ํํ์ ๋ ์์ ฏ์ด ๋ซํ์๋(๋ณด์ด์ง ์๋) ๊ฒฝ์ฐ์๋ ์์ ฏ์ ๋ณด์ฌ์ฃผ๊ณ ์ด๋ฏธ ์์ ฏ์ด ํ์๋๊ณ ์๋ ๊ฒฝ์ฐ์๋ ๋ก๊ทธ๋ง ๊ธฐ๋กํฉ๋๋ค. "Exit" ํญ๋ชฉ์ ์ ํํ ๊ฒฝ์ฐ์๋ ์ฑ์ ์ข
๋ฃํฉ๋๋ค.this.Tray0_PopupMenu00_onmenuclick = function(obj:nexacro.TrayPopupMenu,e:nexacro.MenuClickEventInfo){ if(e.id == "Widget") { var widgetFrame = nexacro.getPopupFrames()["NewWidget"]; if(widgetFrame.visible) { trace(widgetFrame); } else { widgetFrame.set_visible(true); } } else if(e.id == "Exit") { nexacro.getApplication().exit(); }};๋จ๊ณ 7. ์์ ฏ ํผ(WidgetMain1)์์ ๋ฒํผ ํด๋ฆญ ์ ๋ฐ์ํ๋ ์ด๋ฒคํธ ์คํฌ๋ฆฝํธ๋ฅผ ์์ ํฉ๋๋ค.ํธ๋ ์ด์์ ๋ฉ๋ด ์ ํ ์ ๋งค๋ฒ ์๋ก ์์ ฏ ํ๋ฉด์ ์์ฑํ์ง ์๊ณ visible ์์ฑ๊ฐ๋ง ์์ ํด์ ํ์ ์ฌ๋ถ๋ง ๋ณ๊ฒฝํฉ๋๋ค. ๊ทธ๋ฆฌ๊ณ ์์ ฏ์ด ๋ซํ ๋ ํธ๋ ์ด ์์ญ์ ๋ฉ์์ง๋ฅผ ํ์ํ๋๋ก ์ฝ๋๋ฅผ ์ถ๊ฐํ์ต๋๋ค.this.Button00_onclick = function(obj:nexacro.Button,e:nexacro.ClickEventInfo){ //this.close(); this.parent.set_visible(false); nexacro.getApplication().trays["Tray0"].showBalloonTip("information", "Info", "Widget Close");};๋จ๊ณ 8. ํด๋ฐ์์ ์คํ์ต์
์ผ๋ก NRE๋ฅผ ์ ํํ๊ณ Launch ์์ด์ฝ์ ํด๋ฆญํ๊ฑฐ๋ ๋จ์ถํค (Ctrl + F5)๋ฅผ ์
๋ ฅํ๊ณ ์๋์ฐ ํ๋ฉด ์ค๋ฅธ์ชฝ ์๋์ ํธ๋ ์ด๊ฐ ์ ์์ ์ผ๋ก ํ์๋๊ณ ์ค๋ฅธ์ชฝ ๋ง์ฐ์ค ๋ฒํผ ํด๋ฆญ ์ ๋ฉ๋ด๊ฐ ํ์๋๋์ง ํ์ธํฉ๋๋ค.<|eot_id|>
|
<|begin_of_text|>๋ฅ์ฌํฌ๋ก ๊ฐ์ด๋ ๋ถ(์์ฉ๊ฐ๋ฐ ๊ฐ์ด๋) title: ์๋์ฐ ์ด์์ฒด์ NRE์์ ๋จ์ ํ
์คํธ ์คํํ๊ธฐ contents: WinAppDriver ์ฐ๋ ๊ธฐ๋ฅ์ ๋ฅ์ฌํฌ๋ก์์ ์ ๊ณตํ๋ UIAutomation ์ธํฐํ์ด์ค๋ฅผ ์ฌ์ฉํด NRE์์ ์คํํ๋ ์ฑ์ ์์ฑ์ ์ฝ๊ฑฐ๋ ์ฐ๊ณ ํ๋ผ๋ฏธํฐ๋ฅผ ์ง์ ํด ๋ฉ์๋๋ฅผ ์คํํ๋ ๊ฒ์ ์ง์ํฉ๋๋ค. ์
๋ ๋์ ๊ฐ์ UI ์๋ํ ํ
์คํธ ๋๊ตฌ๋ฅผ ์ฌ์ฉํด ๋จ์ ํ
์คํธ๋ฅผ ์์ฑํ๊ณ ํ
์คํธํ ์ ์์ต๋๋ค.์ด๋ฒ ์ฅ์์๋ WinAppDriver๋ฅผ ์ค์นํ๊ณ ๋น์ฃผ์ผ ์คํ๋์ค์ ์ดํด๋ฆฝ์ค์์ ๊ธฐ๋ณธ์ ์ธ C#, Java ํ๋ก์ ํธ๋ฅผ ์์ฑํด ๋ฅ์ฌํฌ๋ก ์ฑ์ ์ฐ๊ฒฐํ๋ ๋จ๊ณ๋ฅผ ์ดํด๋ด
๋๋ค.์ฃผ์:WinAppDriver๋ ์๋์ฐ 10 ์ด์ ํ๊ฒฝ์์ ๋์ํฉ๋๋ค.https://github.com/Microsoft/WinAppDriver#system-requirements## WinAppDriver ์ฐ๋ ํ๊ฒฝ ์ค์ ํ๊ธฐ### WinAppDriver ์ค์นํ๊ธฐ๋จ๊ณ 1. ์๋์ฐ ์ด์์ฒด์ [์ค์ > ๊ฐ๋ฐ์ ๊ธฐ๋ฅ ์ฌ์ฉ]์์ "๊ฐ๋ฐ์ ๋ชจ๋"๋ฅผ ํ์ฑํํฉ๋๋ค.์ฃผ์:ํด๋น ๋ชจ๋๋ฅผ ์ต์ด ํ์ฑํํ๋ ๊ฒฝ์ฐ์๋ ์ด์์ฒด์ ์ค์ ์์
์ ์ฝ๊ฐ์ ์๊ฐ์ด ๊ฑธ๋ฆด ์ ์์ต๋๋ค. ์๊ฐ ์ฌ์ ๋ฅผ ๊ฐ์ง๊ณ ๋ชจ๋๋ฅผ ํ์ฑํํด์ฃผ์ธ์.๋จ๊ณ 2. WinAppDriver ์ค์น ํ์ผ(WindowsApplicationDriver.msi)์ ๋ด๋ ค๋ฐ์ต๋๋ค.๋
ธํธ:https://github.com/Microsoft/WinAppDriverhttps://github.com/Microsoft/WinAppDriver/releases๋จ๊ณ 3. ๋ด๋ ค๋ฐ์ ์ค์น ํ์ผ(WindowsApplicationDriver.msi)์ ์คํํด WinAppDriver๋ฅผ ์ค์นํฉ๋๋ค.๋จ๊ณ 4. ์ค์น ๊ฒฝ๋ก์์ WinAppDriver๋ฅผ ๊ด๋ฆฌ์ ๊ถํ์ผ๋ก ์คํํฉ๋๋ค.๋
ธํธ:์ผ๋ฐ์ ์ธ ์ค์น ๊ฒฝ๋ก๋ ์๋์ ๊ฐ์ต๋๋ค.C:\Program Files (x86)\Windows Application Driver\๋จ๊ณ 5. ์ ์์ ์ผ๋ก ์คํ์ด ๋๋์ง ํ์ธํฉ๋๋ค.๋
ธํธ:ip, port ์ค์ ์ ๋ณ๊ฒฝํ๊ณ ์ ํ๋ค๋ฉด ์๋์ ๊ฐ์ด ์คํํฉ๋๋ค.> WinAppDriver.exe [ip] [port]### ๊ฐ๋ฐ ๋๊ตฌ ์ค์นํ๊ธฐC# ๋๋ Java ์ธ์ด๋ฅผ ์ฌ์ฉํด ๋จ์ํ
์คํธ ํ๋ก์ ํธ๋ฅผ ๋ง๋ค ์ ์์ต๋๋ค.#### ๋น์ฃผ์ผ ์คํ๋์ค ์ค์นํ๊ธฐC# ์ธ์ด๋ฅผ ์ฌ์ฉํ๊ณ ๋น์ฃผ์ผ ์คํ๋์ค๋ฅผ ์ค์นํ์ง ์์ ๊ฒฝ์ฐ ๋ฌด๋ฃ๋ก ์ ๊ณต๋๋ ๊ฐ๋ฐ ๋๊ตฌ๋ฅผ ์ค์นํ ์ ์์ต๋๋ค.๋จ๊ณ 1. ๋น์ฃผ์ผ ์คํ๋์ค ์ปค๋ฎค๋ํฐ ์ค์น ํ์ผ(vs_community__xxxx.xxxx.exe)์ ๋ด๋ ค๋ฐ์ต๋๋ค.๋
ธํธ:Visual Studio Communityhttps://visualstudio.microsoft.com/vs/community/๋จ๊ณ 2. ๋ด๋ ค๋ฐ์ ์ค์น ํ์ผ(vs_community__xxxx.xxxx.exe)์ ์คํํด ๋น์ฃผ์ผ ์คํ๋์ค๋ฅผ ์ค์นํฉ๋๋ค.์ฃผ์:์ค์น ์ ํ์ํ ํจํค์ง๋ฅผ ๋ด๋ ค๋ฐ๋ ๊ณผ์ ์์ ์ฝ๊ฐ์ ์๊ฐ์ด ๊ฑธ๋ฆด ์ ์์ต๋๋ค. ์๊ฐ ์ฌ์ ๋ฅผ ๊ฐ์ง๊ณ ์ค์น๋ฅผ ์งํํด์ฃผ์ธ์.๋จ๊ณ 3. Workloads ํญ๋ชฉ์์ "Universal Windows Platform development"๋ฅผ ์ ํํ๊ณ ์ค์น๋ฅผ ์งํํฉ๋๋ค.๋
ธํธ:๊ฐ๋ฐ ํ๊ฒฝ์ ์ค์น ํ์๋ ์ถ๊ฐํ ์ ์์ต๋๋ค.ํ:์คํ ์ ๋ง์ดํฌ๋ก์ํํธ ๊ณ์ ๋ก๊ทธ์ธํ๋ ์ฐฝ์ด ํ์๋๋๋ฐ, ๋ก๊ทธ์ธ ์์ด๋ ํ
์คํธ๋ ํด๋ณผ ์ ์์ต๋๋ค.#### ์ดํด๋ฆฝ์ค ์ค์นํ๊ธฐJava ์ธ์ด๋ฅผ ์ฌ์ฉํ๊ณ ์ดํด๋ฆฝ์ค๋ฅผ ์ค์นํ์ง ์์ ๊ฒฝ์ฐ ๋ฌด๋ฃ๋ก ์ ๊ณต๋๋ ๊ฐ๋ฐ ๋๊ตฌ๋ฅผ ์ค์นํ ์ ์์ต๋๋ค.๋จ๊ณ 1. ์ดํด๋ฆฝ์ค ์ค์น ํ์ผ(eclipse-inst-win64.exe)์ ๋ด๋ ค๋ฐ์ต๋๋ค.๋
ธํธ:eclipse.orghttps://www.eclipse.org/downloads/๋จ๊ณ 2. ๋ด๋ ค๋ฐ์ ์ค์น ํ์ผ(eclipse-inst-win64.exe)์ ์คํํด ์ดํด๋ฆฝ์ค๋ฅผ ์ค์นํฉ๋๋ค.๋จ๊ณ 3. ๊ฐ๋ฐ ์ ํ ์ ํ ๋จ๊ณ์์๋ "Java Developers" ํญ๋ชฉ์ ์ ํํฉ๋๋ค.## ๋จ์ํ
์คํธ ๋ง๋ค๊ณ ์คํํ๊ธฐ### ๋ฅ์ฌํฌ๋ก ์ฑ ๋ง๋ค๊ณ ๋ฐฐํฌํ๊ธฐ๊ฐ๋จํ ๋ฅ์ฌํฌ๋ก ์ฑ์ ๋ง๋ค๊ณ ๋ฐฐํฌํฉ๋๋ค.ํ:์ด๋ฏธ ์ค์นํ ๋ฅ์ฌํฌ๋ก ์ฑ์ ์ฌ์ฉํ๋ ค๋ ๊ฒฝ์ฐ์๋ ์ด ๋จ๊ณ๋ ์ง๋๊ฐ๋๋ค.๋จ๊ณ 1. ๋ฅ์ฌํฌ๋ก ์คํ๋์ค๋ฅผ ์คํํฉ๋๋ค.๋จ๊ณ 2. ํ๋ก์ ํธ๋ฅผ ์์ฑํ๊ณ ๊ฐ๋จํ ํผ ํ๋ฉด์ ์์ฑํฉ๋๋ค.Button ์ปดํฌ๋ํธ์ Edit ์ปดํฌ๋ํธ๋ง ํ๋ฉด์ ๋ฐฐ์นํฉ๋๋ค.๋จ๊ณ 3. Button ์ปดํฌ๋ํธ์ onclick ์ด๋ฒคํธ ํจ์๋ฅผ ์์ฑํฉ๋๋ค.Button ์ปดํฌ๋ํธ onclick ์ด๋ฒคํธ๊ฐ ๋ฐ์ํ๋ฉด Edit ์ปดํฌ๋ํธ์ value ์์ฑ๊ฐ์ ๋ณ๊ฒฝํฉ๋๋ค.this.Button00_onclick = function(obj:nexacro.Button,e:nexacro.ClickEventInfo){ this.Edit00.set_value("BUTTON CLICK");};๋จ๊ณ 4. ๋ฉ๋ด [Deploy > Packing (Archive&Update)] ํญ๋ชฉ์ ์ ํํ๊ณ ๋ฐฐํฌํ ์์นด์ด๋ธ ํ์ผ์ ์์ฑํฉ๋๋ค.์๋ฒ ์ฐ๊ฒฐ ์์ด ์คํํ ์ ์๋๋ก Update Type์ "Local"๋ก ์ง์ ํฉ๋๋ค.๋จ๊ณ 5. [Packing] ๋ฒํผ์ ํด๋ฆญํด ์์นด์ด๋ธ ํ์ผ์ ์์ฑ๋๋ฉด [Build App] ๋ฒํผ์ ํด๋ฆญํฉ๋๋ค.๋จ๊ณ 6. Build App ์ฐฝ์์ [Build] ๋ฒํผ์ ํด๋ฆญํด ์ค์น ํ์ผ์ ์์ฑํฉ๋๋ค.๋จ๊ณ 7. ์์ฑํ ์ค์น ํ์ผ์ ์คํํด ๋ฅ์ฌํฌ๋ก ์ฑ์ ์ค์นํฉ๋๋ค.### ๋จ์ํ
์คํธ ํ๋ก์ ํธ ๋ง๋ค๊ธฐ#### ๋น์ฃผ์ผ ์คํ๋์ค์์ ๋จ์ํ
์คํธ ํ๋ก์ ํธ ๋ง๋ค๊ธฐ๋จ๊ณ 1. ๋น์ฃผ์ผ ์คํ๋์ค๋ฅผ ์คํํฉ๋๋ค.๋จ๊ณ 2. ์๋ก์ด ํ๋ก์ ํธ ๋ง๋ค๊ธฐ์์ "Unit Test Project"๋ฅผ ์ ํํ๊ณ ์๋ก์ด ํ๋ก์ ํธ๋ฅผ ์์ฑํฉ๋๋ค.๋จ๊ณ 3. Appium WebDriver ๋ผ์ด๋ธ๋ฌ๋ฆฌ๋ฅผ ์ค์นํฉ๋๋ค.๋ฉ๋ด [Project > Manage NuGet Package]๋ฅผ ์ ํํ๊ณ ๊ฒ์์ฐฝ์์ "Appium"์ ์
๋ ฅํด์ ๊ฒ์ ๊ฒฐ๊ณผ์์ Appium WebDriver ๋ผ์ด๋ธ๋ฌ๋ฆฌ๋ฅผ ํ์ธํฉ๋๋ค. [Install] ๋ฒํผ์ ํด๋ฆญํ๋ฉด ๋ผ์ด๋ธ๋ฌ๋ฆฌ๋ฅผ ์ค์นํฉ๋๋ค.๋จ๊ณ 4. Updates ํญ์์ Selenium ๊ด๋ จ ํจํค์ง๋ฅผ ํ์ธํฉ๋๋ค.์ฃผ์:์ต์ ๋ฒ์ ์ด ์ค์น๋ ๊ฒฝ์ฐ์๋ ์ฝ๋๊ฐ ๋์ํ์ง ์์ ์ ์์ต๋๋ค. ์ต์ ๋ฒ์ ์ธ ๊ฒฝ์ฐ์๋ 3.0.1 ๋ฒ์ ์ผ๋ก ๋ง์ด๋ ์
๋ฐ์ดํธํด์ฃผ์ธ์.https://github.com/Microsoft/WinAppDriver/issues/497๋จ๊ณ 5. ์์ฑ๋ C# ์์ค์ฝ๋ํ์ผ์ ์๋์ ๊ฐ์ด ์์ ํฉ๋๋ค.์๋ ์ฝ๋์์ ๋ฅ์ฌํฌ๋ก ์ฑ ๊ด๋ จ ์ค์ ์ ์์ ํฉ๋๋ค. ์ฑ์ด ์ค์น๋ ๊ฒฝ๋ก, nexacro.exe ์คํ ํ์ผ ๊ฒฝ๋ก, nexacro.exe ์คํ ์ต์
์ ์ค์ ์ค์น ๊ฒฝ๋ก์ ๋ง๊ฒ ์์ ํฉ๋๋ค.[Table]| | value ||:----------------------------|:-------------------------------------------------------------------------------------------------------------|| WindowsApplicationDriverUrl | http://127.0.0.1:4723/ || NexacroAppDr | C:\\\\Program Files\\\\TOBESOFT\\\\Nexacro N\\\\21\\\\app0201 || NexacroAppId | C:\\\\Program Files\\\\TOBESOFT\\\\Nexacro N\\\\21\\\\app0201\\\\nexacro.exe || NexacroAppAg | -k 'UnitTest' -s 'C:\\\\Program Files\\\\TOBESOFT\\\\Nexacro N\\\\21\\\\app0201\\\\app0201\\\\start.json' |using System;using System.Threading;using System.Diagnostics;using Microsoft.VisualStudio.TestTools.UnitTesting;using OpenQA.Selenium.Appium.Windows;using OpenQA.Selenium.Remote;namespace UnitTestProject1{ [TestClass] public class NexaTestSession { // winappdriver url protected const string WindowsApplicationDriverUrl = "http://127.0.0.1:4723/"; // app path private const string NexacroAppDr = "C:\\Program Files\\TOBESOFT\\Nexacro N\\21\\app0201"; // nexacro.exe path private const string NexacroAppId = "C:\\Program Files\\TOBESOFT\\Nexacro N\\21\\app0201\\nexacro.exe"; // nexacro.exe argument private const string NexacroAppAg = "-k 'UnitTest' -s 'C:\\Program Files\\TOBESOFT\\Nexacro N\\21\\app0201\\app0201\\start.json'"; // search root private const string FindNexacro = "Root"; // OS/Device private const string TestOs = "Windows"; private const string TestDevice = "WindowsPC"; // Session Object : WindowsDriver protected static WindowsDriver<WindowsElement> session; // WinAppDriver Session Create [ClassInitialize] public static void Setup(TestContext context) { // Launch a new instance of nexacro application or find nexacro application } // WinAppDriver Session Delete public static void TearDown() { // Close the application and delete the session if (session != null) { // Close Session โ Close Application session.Close(); // Quit Session session.Quit(); // Delete Session session = null; } } [TestMethod] public void Test_Session() { Debug.WriteLine("session:" + session); Debug.WriteLine("session.SessionId:" + session.SessionId); } }}๋จ๊ณ 6. ๋ฅ์ฌํฌ๋ก ์ฑ์ ์คํํ๊ณ ์ธ์
์ ์์ฑํ๋ ์ฝ๋๋ฅผ ์ถ๊ฐํฉ๋๋ค.์์ ์ฝ๋์์ Setup ๋ฉ์๋๋ฅผ ์๋์ ๊ฐ์ด ์์ ํฉ๋๋ค.// WinAppDriver Session Create[ClassInitialize]public static void Setup(TestContext context){ // Launch a new instance of nexacro application or find nexacro application if (session == null) { // Create a new session to launch nexacro application DesiredCapabilities appCapabilities = new DesiredCapabilities(); TimeSpan time = new TimeSpan(0, 0, 10); // Launch Nexacro appCapabilities.SetCapability("app", NexacroAppId); appCapabilities.SetCapability("appArguments", NexacroAppAg); appCapabilities.SetCapability("appWorkingDir", NexacroAppDr); appCapabilities.SetCapability("platformName", TestOs); appCapabilities.SetCapability("deviceName", TestDevice); // Request Remote WinAppDriver Service session = new WindowsDriver<WindowsElement>(new Uri(WindowsApplicationDriverUrl), appCapabilities, time); // Set implicit timeout to 1.5 seconds to make element search to retry every 500 ms for at most three times session.Manage().Timeouts().ImplicitlyWait(TimeSpan.FromSeconds(0.5)); Thread.Sleep(TimeSpan.FromSeconds(1.0)); }}ํ:TimeSpan ์ค์ ๊ฐ์ ๋ฐ๋ผ ํ์์์ ์ค๋ฅ๊ฐ ๋ฐ์ํ๋ ๊ฒฝ์ฐ๊ฐ ์์ต๋๋ค. ๊ทธ๋ฐ ๊ฒฝ์ฐ์๋ ์๋์ ๊ฐ์ด ์ค์ ๊ฐ์ ๋ณ๊ฒฝํด์ ํ
์คํธ๋ฅผ ์งํํฉ๋๋ค.TimeSpan time = new TimeSpan(0, 0, 30);๋จ๊ณ 7. ๋ฉ๋ด [Test > Run > All Tests] ํญ๋ชฉ์ ์ ํํ๋ฉด ํ
์คํธ๋ฅผ ์งํํฉ๋๋ค. ์ค์นํ ์ฑ์ด ์คํ๋๋ ๊ฒ์ ํ์ธํ ์ ์์ต๋๋ค.WinAppDriver์ ์คํํ ์ฝ์ ํ๋ฉด์์ ์ ์ ์ ๋ณด์ ์ธ์
์ด ์์ฑ๋ ๊ฒ์ ํ์ธํ ์ ์์ต๋๋ค.๋จ๊ณ 8. ๋น์ฃผ์ผ ์คํ๋์ค ํ
์คํธ ํ์๊ธฐ์์๋ ์ฑ๊ณตํ ํ
์คํธ ์ ๋ณด๋ฅผ ํ์ธํ ์ ์์ต๋๋ค.#### ์ดํด๋ฆฝ์ค์์ ๋จ์ํ
์คํธ ํ๋ก์ ํธ ๋ง๋ค๊ธฐ๋จ๊ณ 1. ์ดํด๋ฆฝ์ค๋ฅผ ์คํํฉ๋๋ค.๋จ๊ณ 2. ๋ฉ๋ด [File > New > Java Project]๋ฅผ ์ ํํ๊ณ ์๋ก์ด ํ๋ก์ ํธ๋ฅผ ์์ฑํฉ๋๋ค.๋จ๊ณ 3. ํ์ํ ๋ผ์ด๋ธ๋ฌ๋ฆฌ๋ฅผ ๋ด๋ ค๋ฐ์ต๋๋ค. ์์ถ๋ ํ์ผ(.zip)์ ์์ถ์ ํด์ ํฉ๋๋ค.[Table]| ๋ผ์ด๋ธ๋ฌ๋ฆฌ | ๋ค์ด๋ก๋ ๊ฒฝ๋ก ||:------------------------|:---------------------------------------------------------------------|| Appium Client Libraries | http://appium.io/downloads.html || | java-client-7.0.0.jar || Selenium Client | https://www.seleniumhq.org/download/ || | selenium-java-3.141.59.zip || Apache Commons Lang | http://commons.apache.org/proper/commons-lang/download_lang.cgi || | commons-lang3-3.8.1-bin.zip |๋
ธํธ:Apache Commons Lang ๋ผ์ด๋ธ๋ฌ๋ฆฌ๋ ์คํ ์ค ์๋์ ๊ฐ์ ์ค๋ฅ ๋ฐ์ ์ ๋ด๋ ค๋ฐ์ ์ค์นํฉ๋๋ค.๊ฐ๋ฐ ํ๊ฒฝ์ ๋ฐ๋ผ ํ์์์ ์๋ ์์ต๋๋ค.java.lang.NoClassDefFoundError: org/apache/commons/lang3/StringUtils๋จ๊ณ 4. JUnit ๋ผ์ด๋ธ๋ฌ๋ฆฌ๋ฅผ ์ถ๊ฐํฉ๋๋ค. ๋ฉ๋ด [Project > Properties > Java Build Path > Libraries] ํญ์ ์ ํํ๊ณ [Add Library] ๋ฒํผ์ ํด๋ฆญํฉ๋๋ค.๋จ๊ณ 5. Appium, Selenium ๋ผ์ด๋ธ๋ฌ๋ฆฌ๋ฅผ ์ถ๊ฐํฉ๋๋ค. [Add External JARs] ๋ฒํผ์ ํด๋ฆญํ๊ณ ๋ด๋ ค๋ฐ์ ๋ผ์ด๋ธ๋ฌ๋ฆฌ ํ์ผ์์ JAR ํ์ผ์ ์ถ๊ฐํฉ๋๋ค.๋จ๊ณ 6. [Apply and Close] ๋ฒํผ์ ํด๋ฆญํด ๋ณ๊ฒฝํ ๋ด์ฉ์ ์ ์ฉํฉ๋๋ค.๋จ๊ณ 7. ๋ฉ๋ด [File > New > Class]๋ฅผ ์ ํํ๊ณ ์๋ก์ด ํด๋์ค ํ์ผ์ ์์ฑํฉ๋๋ค. Name ํญ๋ชฉ๋ง ์
๋ ฅํ๊ณ ๋ค๋ฅธ ์ต์
์ ์์ ํ์ง ์์ต๋๋ค.๋จ๊ณ 8. ์์ฑ๋ Java ์์ค์ฝ๋ํ์ผ์ ์๋์ ๊ฐ์ด ์์ ํฉ๋๋ค.์๋ ์ฝ๋์์ ๋ฅ์ฌํฌ๋ก ์ฑ ๊ด๋ จ ์ค์ ์ ์์ ํฉ๋๋ค. ์ฑ์ด ์ค์น๋ ๊ฒฝ๋ก, nexacro.exe ์คํ ํ์ผ ๊ฒฝ๋ก, nexacro.exe ์คํ ์ต์
์ ์ค์ ์ค์น ๊ฒฝ๋ก์ ๋ง๊ฒ ์์ ํฉ๋๋ค.[Table]| | value ||:----------------------------|:---------------------------------------------------------------------------------------------------------------------|| WindowsApplicationDriverUrl | http://127.0.0.1:4723/ || NexacroAppDr | C:\\\\Program Files \(x86\)\\\\TOBESOFT\\\\Nexacro N\\\\21\\\\app0201 || NexacroAppId | C:\\\\Program Files \(x86\)\\\\TOBESOFT\\\\Nexacro N\\\\21\\\\app0201\\\\nexacro.exe || NexacroAppAg | -k 'UnitTest' -s 'C:\\\\Program Files \(x86\)\\\\TOBESOFT\\\\Nexacro N\\\\21\\\\app0201\\\\app0201\\\\start.json' |import org.junit.*;import org.openqa.selenium.remote.DesiredCapabilities;import org.openqa.selenium.remote.RemoteWebElement;import io.appium.java_client.windows.WindowsDriver;import java.util.concurrent.TimeUnit;import java.net.URL;public class UnitTest { // winappdriver url private String WindowsApplicationDriverUrl = "http://127.0.0.1:4723/"; // app path private String NexacroAppDr = "C:\\Program Files (x86)\\TOBESOFT\\Nexacro N\\21\\app0201"; // nexacro.exe path private String NexacroAppId = "C:\\Program Files (x86)\\TOBESOFT\\Nexacro N\\21\\app0201\\nexacro.exe"; // nexacro.exe argument private String NexacroAppAg = "-k 'UnitTest' -s 'C:\\Program Files (x86)\\TOBESOFT\\Nexacro N\\21\\app0201\\app0201\\start.json'"; // search root // private String FindNexacro = "Root"; // OS/Device private String TestOs = "Windows"; private String TestDevice = "WindowsPC"; // Session Object : WindowsDriver private static WindowsDriver<RemoteWebElement> session = null; @Before public void setUp() throws Exception { // Launch a new instance of nexacro application or find nexacro application } @After public void tearDown() throws Exception { if (session != null) { // NexacroSession.quit(); } } @Test public void Test_01_Session() { System.out.println("session : " + session); System.out.println("session.SessionId : " + session.getSessionId()); }}๋จ๊ณ 9. ๋ฅ์ฌํฌ๋ก ์ฑ์ ์คํํ๊ณ ์ธ์
์ ์์ฑํ๋ ์ฝ๋๋ฅผ ์ถ๊ฐํฉ๋๋ค.์์ ์ฝ๋์์ Setup ๋ฉ์๋๋ฅผ ์๋์ ๊ฐ์ด ์์ ํฉ๋๋ค.@Beforepublic void setUp() throws Exception { // Launch a new instance of nexacro application or find nexacro application try { // Create a new session to launch nexacro application DesiredCapabilities appCapabilities = new DesiredCapabilities(); appCapabilities.setCapability("app", NexacroAppId); appCapabilities.setCapability("appArguments", NexacroAppAg); appCapabilities.setCapability("appWorkingDir", NexacroAppDr); appCapabilities.setCapability("platformName", TestOs); appCapabilities.setCapability("deviceName", TestDevice); // Request Remote WinAppDriver Service session = new WindowsDriver<RemoteWebElement>(new URL(WindowsApplicationDriverUrl), appCapabilities); session.manage().timeouts().implicitlyWait(1, TimeUnit.SECONDS); } catch (Exception e) { e.printStackTrace(); } finally { }}๋จ๊ณ 10. ๋ฉ๋ด [Run > Run As > JUnit Test] ํญ๋ชฉ์ ์ ํํ๋ฉด ํ
์คํธ๋ฅผ ์งํํฉ๋๋ค. ์ค์นํ ์ฑ์ด ์คํ๋๋ ๊ฒ์ ํ์ธํ ์ ์์ต๋๋ค.WinAppDriver์ ์คํํ ์ฝ์ ํ๋ฉด์์ ์ ์ ์ ๋ณด์ ์ธ์
์ด ์์ฑ๋ ๊ฒ์ ํ์ธํ ์ ์์ต๋๋ค.๋จ๊ณ 11. JUnit ํจ๋์์ ์ฑ๊ณตํ ํ
์คํธ ์ ๋ณด๋ฅผ ํ์ธํ ์ ์์ต๋๋ค.### ๋จ์ํ
์คํธ ์คํํ๊ธฐ๋จ๊ณ 1. ๋จ์ํ
์คํธ๋ฅผ ์คํํ ์ฝ๋๋ฅผ ์๋์ ๊ฐ์ด ์ถ๊ฐํฉ๋๋ค.ํ์ฌ ์ธ์
์์ Button ์ปดํฌ๋ํธ๋ฅผ ์ฐพ๊ณ ๋ง์ฐ์ค ํด๋ฆญ ๋ช
๋ น์ ์ฒ๋ฆฌํฉ๋๋ค.์ฝ๋ 4- C#[TestMethod]public void Test_Button(){ WindowsElement element = session.FindElementByAccessibilityId("mainframe.WorkFrame.form.Button00"); Assert.IsNotNull(element); Thread.Sleep(TimeSpan.FromSeconds(0.1)); element.Click();}์ฝ๋ 4- Java@Testpublic void Test_Button() throws Exception { WebElement element = session.findElementByAccessibilityId("mainframe.WorkFrame.form.Button00"); Assert.assertNotNull(element); Thread.sleep(1000); element.click();}๋จ๊ณ 2. ํ
์คํธ๋ฅผ ์คํํ๋ฉด ์ค์นํ ์ฑ์ด ์คํ๋๊ณ Button ์ปดํฌ๋ํธ ์์ ๋ง์ฐ์ค ์ปค์๊ฐ ์์นํ๊ณ ํด๋ฆญ ๋ช
๋ น์ ์คํํ๋ ๊ฒ์ ํ์ธํ ์ ์์ต๋๋ค.## AccessibilityId ์์ฑ๊ฐ ํ์ธํ๊ธฐ์ปดํฌ๋ํธ๋ ์ปจํธ๋กค์ ์ ๊ทผํ๊ธฐ ์ํด์ FindElementByAccessibilityId ๋ฉ์๋๋ฅผ ์ฌ์ฉํ๋๋ฐ ์ด๋ AccessibilityId ์์ฑ๊ฐ์ ํ์ธํด์ผ ํฉ๋๋ค.### ์ปดํฌ๋ํธ ์์ฑ๊ฐ ํ์ธํ๊ธฐForm์ ๋ฐฐ์น๋ ์ปดํฌ๋ํธ ์์ฒด์ ์ ๊ทผํ๋ ๋ฐฉ์์ ์๋์ ๊ฐ์ต๋๋ค.[MainFrame id ์์ฑ๊ฐ].[ChildFrame id ์์ฑ๊ฐ].form.[Component id ์์ฑ๊ฐ]id ์์ฑ๊ฐ์ด "Button00"์ธ Button ์ปดํฌ๋ํธ์ ์๋ฆฌ๋จผํธ๋ฅผ ์ป๊ธฐ ์ํด์๋ ์๋์ ๊ฐ์ด ์ฝ๋๋ฅผ ์์ฑํฉ๋๋ค.์ฝ๋ 4- C#WindowsElement element = session.FindElementByAccessibilityId("mainframe.ChildFrame00.form.Button00");Div ์ปดํฌ๋ํธ ์์ ๋ฐฐ์นํ ์ปดํฌ๋ํธ๋ ์๋์ ๊ฐ์ด ์ ๊ทผํ ์ ์์ต๋๋ค.์ฝ๋ 4- C#WindowsElement element = session.FindElementByAccessibilityId("mainframe.ChildFrame00.form.Div00.form.CheckBox00");### ์ปจํธ๋กค, ์์ดํ
์์ฑ๊ฐ ํ์ธํ๊ธฐ์๋ฅผ ๋ค์ด Div ์ปดํฌ๋ํธ ์์ ๋ฐฐ์น๋ Combo ์ปดํฌ๋ํธ์ dropbutton์ ์๋์ ๊ฐ์ด ์๋ฆฌ๋จผํธ๋ฅผ ์ป์ ์ ์์ต๋๋ค.์ฝ๋ 4- C#WindowsElement element = session.FindElementByAccessibilityId("mainframe.ChildFrame00.form.Div00.form.Combo00.dropbutton");๋จ์ ํ
์คํธ๋ฅผ ์งํํ๊ธฐ ์ํด์๋ Combo ์ปดํฌ๋ํธ์ ๋๋กญ๋ค์ด๋ชฉ๋ก์ ํผ์น๊ณ ์์ดํ
์ ์ ํํด์ผ ํฉ๋๋ค. ๋๋กญ๋ค์ด๋ชฉ๋ก์ ํผ์น๊ธฐ ์ํด์๋ Combo ์ปดํฌ๋ํธ ๋ด ButtonControl์ ์ ๊ทผํด์ผ ํ๊ณ ํด๋น ์ปจํธ๋กค์ ์์ฑ๊ฐ์ ํ์ธํด์ผ ํฉ๋๋ค.์ปจํธ๋กค ์์ฑ๊ฐ์ ๋ฅ์ฌํฌ๋ก ์คํ๋์ค์์ Help(๋จ์ถํค F1)์ ์คํํ๋ฉด ์ปดํฌ๋ํธ ๊ฐ์์์ ํ์ธํ ์ ์์ต๋๋ค. Combo ์ปดํฌ๋ํธ์์ ๋๋กญ๋ค์ด๋ชฉ๋ก์ ํผ์น๊ธฐ ์ํด ํด๋ฆญํ๋ ๋ฒํผ์ id ์์ฑ๊ฐ์ด "dropbutton"์ด๋ผ๋ ๊ฒ์ ํ์ธํ ์ ์์ต๋๋ค.### Inspect๋ก ์์ฑ๊ฐ ํ์ธํ๊ธฐ์ฃผ์:๋์๋ง์์ ๋
ธ์ถ๋์ง ์๋ ์์ฑ๊ฐ(ํ์ ์ปจํธ๋กค)์ ์ ํ ๋ฒ์ ์ ๋ฐ๋ผ ๋ณ๊ฒฝ๋ ์ ์์ต๋๋ค.ํด๋น ์์ฑ๊ฐ ๋ณ๊ฒฝ ์ ์์ฑ๋ ํ
์คํธ๊ฐ ๋์ํ์ง ์์ ์ ์์ต๋๋ค.ํ์ง๋ง ๋๋กญ๋ค์ด๋ชฉ๋ก์ ํผ์น ํ์ Item 3์ ์ ๊ทผํ๋ ค๋ฉด ์ด๋ป๊ฒ ํด์ผ ํ๋์ง๋ ์๋ ค์ฃผ์ง ์์ต๋๋ค. ์ด๋ฐ ๊ฒฝ์ฐ์๋ "Inspect" ๋ผ๋ ๋๊ตฌ๋ฅผ ์ฌ์ฉํฉ๋๋ค. "Inspect"๋ ์๋์ฐ SDK๊ฐ ์ค์น๋์ด ์๋ค๋ฉด ์ค์น ๊ฒฝ๋ก์์ ์ฐพ์ ์ ์์ต๋๋ค.๋
ธํธ:Inspecthttps://docs.microsoft.com/en-us/windows/desktop/winauto/inspect-objects๋จ๊ณ 1. ์๋์ฐ SDK ์ค์น ๊ฒฝ๋ก์์ inspect.exe ํ์ผ์ ์คํํฉ๋๋ค.๋จ๊ณ 2. ๋ฅ์ฌํฌ๋ก ์ฑ์ ์คํํ๊ณ ๋ง์ฐ์ค ์ปค์๋ฅผ ์ํ๋ ์์น๋ก ๊ฐ์ ธ๊ฐ๋๋ค.๋จ๊ณ 3. Combo ์ปดํฌ๋ํธ์ dropdown ๋ฒํผ์ ํด๋ฆญํด์ ๋๋กญ๋ค์ด ๋ชฉ๋ก์ ํผ์นฉ๋๋ค.๋จ๊ณ 4. ์ํ๋ ์์ดํ
์์ญ์ ๋ง์ฐ์ค ์ปค์๋ฅผ ๊ฐ์ ธ๊ฐ๋๋ค. ์๋ ๊ทธ๋ฆผ์ฒ๋ผ Inspect๊ฐ ์ธ์ํ ๋์ ์์ญ์ ํ
๋๋ฆฌ์ ์ด ํ์๋๊ณ Inspect ์ฐฝ์ ๊ด๋ จ ์ ๋ณด๊ฐ ํ์๋ฉ๋๋ค.์ฌ๋ฌ ์ ๋ณด๊ฐ ๋ณด์ฌ์ง๋๋ฐ ๊ทธ ์ค์์ AccessibilityId ์์ฑ๊ฐ์ผ๋ก ์ฌ์ฉํ ํญ๋ชฉ์ "AutomationId"์
๋๋ค.๋๋กญ๋ค์ด๋ชฉ๋ก์์ 2๋ฒ์งธ ์์ดํ
์ ์ ํํ ๋๋ ์๋์ ๊ฐ์ด ์๋ฆฌ๋จผํธ๋ฅผ ์ป์ ์ ์์ต๋๋ค.์ฝ๋ 4- C#WindowsElement element = session.FindElementByAccessibilityId("mainframe.ChildFrame00.form.Div00.form.Combo00.combolist.item_1");์์ดํ
์ ํด๋นํ๋ ์๋ฆฌ๋จผํธ๋ ๋๋กญ๋ค์ด๋ชฉ๋ก์ด ํผ์ณ์ง ํ์ ์ ๊ทผํ ์ ์์ต๋๋ค. ๋ชฉ๋ก์ ํผ์น๊ธฐ ์ ์ ํด๋น ์์ดํ
์ ์ ๊ทผํ๋ ค ํ๋ค๋ฉด ํ
์คํธ ์คํจ๋ก ์ฒ๋ฆฌ๋ฉ๋๋ค.ํ
์คํธ ์ฝ๋์์ ์๋์ ๊ฐ์ด ๋จผ์ dropbutton ์๋ฆฌ๋จผํธ๋ฅผ ์ฐพ์์ ๋ง์ฐ์ค ํด๋ฆญ ์ด๋ฒคํธ๋ฅผ ์ฒ๋ฆฌํ๊ณ ๋๋กญ๋ค์ด๋ชฉ๋ก์ด ํผ์ณ์ง๋ฉด ๊ทธ๋ ์ํ๋ ์์ดํ
์ ์ ๊ทผํฉ๋๋ค.์ฝ๋ 4- C#[TestMethod]public void Test_00_FindElementItem(){ WindowsElement element = session.FindElementByAccessibilityId("mainframe.ChildFrame00.form.Div00.form.Combo00.dropbutton"); Assert.IsNotNull(element); element.Click(); Thread.Sleep(TimeSpan.FromSeconds(0.1)); WindowsElement elementItem = session.FindElementByAccessibilityId("mainframe.ChildFrame00.form.Div00.form.Combo00.combolist.item_1"); Assert.IsNotNull(elementItem); Debug.WriteLine("elementItem.Text:" + elementItem.Text);}## ๊ธฐ๋ฅ๋ณ ๋ฐ๋ชจ ๋จ์ ํ
์คํธ ์คํํ๊ธฐ๊ธฐ๋ฅ๋ณ ๋ฐ๋ชจ๋ฅผ ์คํํ๊ธฐ ์ํ ๋ฅ์ฌํฌ๋ก ์ฑ ์ค์นํ์ผ๊ณผ Java, C# ์ํ ํ์ผ์ ๋ด๋ ค๋ฐ์ ์ ์์ต๋๋ค.๋จ๊ณ 1. ์น๋ธ๋ผ์ฐ์ ์์ ์๋ ์ฃผ์๋ก ์ ์ํฉ๋๋ค.https://github.com/TOBESOFT-DOCS/sample_nexacroplatform_17_winappdriver2๊ฐ์ ํด๋์ ํ๋์ ์ค์นํ์ผ์ ํ์ธํ ์ ์์ต๋๋ค.๋จ๊ณ 2. nexacro17_SetupRuntime_x86.exe ํ์ผ์ ๋ด๋ ค๋ฐ์ต๋๋ค. ํ์ผ๋ช
์ ๋ง์ฐ์ค๋ก ํด๋ฆญํ๋ฉด [Download] ๋ฒํผ์ ํ์ธํ ์ ์์ต๋๋ค.๋จ๊ณ 3. ๋ด๋ ค๋ฐ์ ์ค์นํ์ผ์ ์คํํด ์ฑ์ ์ค์นํฉ๋๋ค. ์๋ ๊ฒฝ๋ก์ ์ฑ์ด ์ค์น๋ฉ๋๋ค.C:\Program Files (x86)\nexacro\17\app0201๋จ๊ณ 4. ๋จ์ํ
์คํธ ํ๋ก์ ํธ ๋ง๋ค๊ธฐ์์ ๋ง๋ ํ๋ก์ ํธ์ C#, Java ์ํ์ ๋ถ์ฌ๋ฃ์ต๋๋ค.๋จ๊ณ 5. ๋จ์ํ
์คํธ๋ฅผ ์คํํฉ๋๋ค. ์ ์์ ์ผ๋ก ๋จ์ํ
์คํธ๊ฐ ์ฒ๋ฆฌ๋๋์ง ํ์ธํฉ๋๋ค.## ์ง์ ์ธํฐํ์ด์ค์ฃผ์:SeleniumRC, Appium ์ธํฐํ์ด์ค๋ฅผ ๋ชจ๋ ์ง์ํ์ง๋ ์์ต๋๋ค.๋ฅ์ฌํฌ๋ก ํ๋ซํผ์์ ์ง์ํ ์ ์๊ฑฐ๋ WinAppDriver์์ ์ง์ํ์ง ์๋ ๊ธฐ๋ฅ์ ์ ์ธํ์ต๋๋ค.๋
ธํธ:์๋ ํญ๋ชฉ์ ํด๋ผ์ด์ธํธ์์ ๋ณ๋ ์ธํฐํ์ด์ค๋ฅผ ์ง์ํ์ง ์๊ณ ์น๋ธ๋ผ์ฐ์ ์์ ์ง์ ํธ์ถํ๊ฑฐ๋ HttpWebResponse ๋ฑ์ ์ฌ์ฉํด ํธ์ถํ ๊ฒฝ์ฐ ์ฌ์ฉํ ์ ์์ต๋๋ค.[Table]| HTTP | WebDriver | WinAppDriver ||:-------|:----------------------------------------|:------------------------------------|| GET | /status | /status || GET | | /sessions || GET | /session/\{session id\}/window | /session/:sessionId/window || GET | /session/\{session id\}/window/handles | /session/:sessionId/window/handles || POST | /session/\{session id\}/window/maximize | /session/:sessionId/window/maximize |### Session#### ์ธ์
์์ฑํ๊ธฐwinappdriver ์ ๋ณด๋ก ์ธ์
์ ์์ฑํ๊ณ ์ฑ์ ์คํํฉ๋๋ค.[Table]| C\# | session = new WindowsDriver\(new Uri\(WinAppDriverUrl\), appCapabilities\); ||:------|:----------------------------------------------------------------------------------------|| Java | session = new WindowsDriver\(new URL\(WindowsApplicationDriverUrl\), appCapabilities\); || ํต์ | POST /session \{ โฆcapabilities json dataโฆ \} |#### ์ธ์
์ข
๋ฃํ๊ธฐ์ธ์
์ ์ข
๋ฃํ๊ณ ํด๋น ์ฑ์ ์ข
๋ฃํฉ๋๋ค.[Table]| C\# | session.Quit\(\); ||:------|:-----------------------------|| Java | session.quit\(\); || ํต์ | DELETE /session/:session_id |์ฃผ์:WinAppDriver์์ ์ ๊ณตํ๋ ์ธํฐํ์ด์ค ์ค ์ผ๋ถ๋ ๋ฅ์ฌํฌ๋ก์์ ์ง์ํ์ง ์์ต๋๋ค.### Timeout#### ํ์์์ ์ค์ ํ๊ธฐ์ธ์
๋์ ์ ์ ์ฉํ timeout ๊ฐ์ ์ค์ ํฉ๋๋ค.[Table]| C\# | session.Manage\(\).Timeouts\(\).ImplicitlyWait\(TimeSpan.FromSeconds\(0.5\)\); ||:------|:--------------------------------------------------------------------------------------|| Java | session.manage\(\).timeouts\(\).implicitlyWait\(1, TimeUnit.SECONDS\); || ํต์ | POST /session/:session_id/timeouts \{"type":"implicit","ms":500.0\} |### Frame#### Mainframe ์ ๋ณด ํ์ธํ๊ธฐMainFrame ์ค๋ธ์ ํธ์ titletext ์์ฑ๊ฐ์ ๋ฐํํฉ๋๋ค.[Table]| C\# | session.Title; ||:------|:------------------------------|| Java | session.getTitle\(\); || ํต์ | GET /session/:sessionId/title |### Window#### ํ์ฑํ๋ ์๋์ฐ ๋ณ๊ฒฝํ๊ธฐํ์ฌ ์๋์ฐ๋ฅผ ๋ณ๊ฒฝํฉ๋๋ค. Windowhandle์ session.WindowHandles์์ ์ป์ ์ ์์ต๋๋ค. ์ต์ด ์คํ์์๋ MainFrame ์ค๋ธ์ ํธ๊ฐ ํ์ฌ ์๋์ฐ๋ก ์ค์ ๋ฉ๋๋ค.[Table]| C\# | session.SwitchTo\(\).Window\(session.WindowHandles\[0\]\); ||:------|:----------------------------------------------------------------|| Java | Set\<String\> handles = session.getWindowHandles\(\); || | Set handles = session.getWindowHandles\(\); || ํต์ | POST /session/:sessionId/window \{"name":"0x000A12BC"\} |#### ํ์ฑํ๋ ์๋์ฐ ์ข
๋ฃํ๊ธฐํ์ฌ ์๋์ฐ๋ฅผ ์ข
๋ฃํฉ๋๋ค.[Table]| C\# | session.Close\(\); ||:------|:----------------------------------|| Java | session.close\(\); || ํต์ | DELETE /session/:sessionId/window |#### ํ์ฑํ๋ ์๋์ฐ ํธ๋ค ์ป๊ธฐํ์ฌ ์๋์ฐ ํธ๋ค ์ค๋ธ์ ํธ๋ฅผ ๋ฐํํฉ๋๋ค.[Table]| C\# | handle = session.CurrentWindowHandle; ||:------|:-----------------------------------------|| Java | Handle = session.getWindowHandle\(\); || ํต์ | GET /session/:sessionId/window_handle |#### ์๋์ฐ ํธ๋ค ๋ฐฐ์ด ์ป๊ธฐ๋ชจ๋ ์๋์ฐ ํธ๋ค ์ค๋ธ์ ํธ๋ฅผ ๋ฐฐ์ด ํํ๋ก ๋ฐํํฉ๋๋ค.[Table]| C\# | handlearray = session.WindowHandles; ||:------|:---------------------------------------------|| Java | Set handles = session.getWindowHandles\(\); || ํต์ | GET /session/:sessionId/window_handles |#### ์๋์ฐ ํฌ๊ธฐ ์ ๋ณด ํ์ธํ๊ธฐ์๋์ฐ ํฌ๊ธฐ๋ฅผ Size ์ค๋ธ์ ํธ ํํ๋ก ๋ฐํํฉ๋๋ค.[Table]| C\# | session.Manage\(\).Window.Size; ||:------|:--------------------------------------------------|| Java | session.getWindowHandles\(\).size\(\) || ํต์ | GET /session/:sessionId/window/:windowHandle/size |#### ์๋์ฐ ํฌ๊ธฐ ๋ณ๊ฒฝํ๊ธฐ์๋์ฐ ํฌ๊ธฐ๋ฅผ ๋ณ๊ฒฝํฉ๋๋ค.[Table]| C\# | session.Manage\(\).Window.Size = new Size\(width,height\); ||:------|:----------------------------------------------------------------------------|| Java | session.manage\(\).window\(\).setSize\(new Dimension\(width, height\)\); || ํต์ | POST /session/:sessionId/window/:windowHandle/size |#### ์๋์ฐ ์์น ์ ๋ณด ํ์ธํ๊ธฐ์๋์ฐ ์์น๋ฅผ Point ์ค๋ธ์ ํธ ํํ๋ก ๋ฐํํฉ๋๋ค.[Table]| C\# | point = session.Manage\(\).Window.Position; ||:------|:---------------------------------------------------------|| Java | point = session.manage\(\).window\(\).getPosition\(\) || ํต์ | GET /session/:sessionId/window/:windowHandle/position |#### ์๋์ฐ ์์น ๋ณ๊ฒฝํ๊ธฐ์๋์ฐ ์ขํ๋ฅผ ๋ณ๊ฒฝํฉ๋๋ค.[Table]| C\# | session.Manage\(\).Window.Position = new Point\(left,top\); ||:------|:-----------------------------------------------------------------------|| Java | session.manage\(\).window\(\).setPosition\(new Point\(left, top\)\) || ํต์ | POST /session/:sessionId/window/:windowHandle/position |#### ์๋์ฐ ์ต๋ํ์๋์ฐ ํฌ๊ธฐ๋ฅผ ์ต๋ํํฉ๋๋ค.[Table]| C\# | session.Manage\(\).Window.Maxmize\(\); ||:------|:-------------------------------------------------------|| Java | session.manage\(\).window\(\).maximize\(\); || ํต์ | POST /session/:sessionId/window/:windowHandle/maximize |### ElementElement๋ WinAppDriver ๋์์ ์ต์๋จ์์
๋๋ค. ๋ฅ์ฌํฌ๋ก์์๋ ์ปดํฌ๋ํธ, ์ปจํธ๋กค์ ๊ตฌ์ฑ์์์ธ nexacro Element๋ฅผ Element๋ก ์ฒ๋ฆฌํฉ๋๋ค.ControlElement๊ฐ ์ปดํฌ๋ํธ๋ฅผ ๋๋ฌ์ธ๊ณ ์๊ณ ๊ทธ ์์ ContainerElement, InputElement, IconTextElement, TextElement ๋ฑ์ Element๊ฐ ์๋ฆฌ์ก๊ณ ์์ต๋๋ค. Button ์ปดํฌ๋ํธ์ ๊ฒฝ์ฐ๋ ์๋์ ๊ฐ์ด ๊ตฌ์ฑ๋ฉ๋๋ค.#### ์๋ฆฌ๋จผํธ ์ป๊ธฐ์ปดํฌ๋ํธ, ์ปจํธ๋กค์ ControlElement ์ค๋ธ์ ํธ๋ฅผ ๋ฐํํฉ๋๋ค.[Table]| C\# | element = session.FindElementByAccessibilityId\("mainframe.ChildFrame00.form.Button00"\); ||:------|:------------------------------------------------------------------------------------------------|| Java | element = session.findElementByAccessibilityId\("mainframe.ChildFrame00.form.Button00"\); || ํต์ | POST /session/:sessionId/element || | \{ "using":"accessibilityid", "value":"mainframe.ChildFrame00.form.Button00" \} |๋
ธํธ:๋ฅ์ฌํฌ๋ก ํ๋ซํผ์์ open ๋ฉ์๋ ์คํ ์ objParentFrame ํ๋ผ๋ฏธํฐ๊ฐ์ null๋ก ์ค์ ํ ๊ฒฝ์ฐ์๋ ChildFrame ID๋ฅผ ๊ธฐ์ค์ผ๋ก ์ ๊ทผํฉ๋๋ค.์ฝ๋ 4- C#// parent null ์ง์ ์ : nexacro.open("openframe", url, null, ...) nexaButton00 = session.FindElementByAccessibilityId("openframe.form.Button00");// parent frame ์ง์ ์ : nexacro.open("openframe", url, ownerframe, ...)nexaButton00 = session.FindElementByAccessibilityId("mainframe.ChildFrame00.openframe.form.Button00");#### ์๋ฆฌ๋จผํธ ๋ฐฐ์ด ์ป๊ธฐ์ปดํฌ๋ํธ, ์ปจํธ๋กค์ ControlElement ์ค๋ธ์ ํธ ๋ชฉ๋ก์ ๋ฐฐ์ด๊ฐ์ผ๋ก ๋ฐํํฉ๋๋ค.[Table]| C\# | element = session.FindElementsByAccessibilityId\("mainframe.ChildFrame00.form.Button00"\); ||:------|:-------------------------------------------------------------------------------------------------|| Java | element = session.findElementsByAccessibilityId\("mainframe.ChildFrame00.form.Button00"\); || ํต์ | POST /session/:sessionId/elements || | \{ "using":"accessibilityid", "value":"mainframe.ChildFrame00.form.Button00" \} |#### ์๋ฆฌ๋จผํธ id๊ฐ ํ์ธํ๊ธฐWinAppDriver Element์ id๊ฐ์ ๋ฐํํฉ๋๋ค.[Table]| C\# | id = element.Id; ||:------|:-----------------------------------------|| Java | id = element.getTagName\(\) || ํต์ | GET /session/:sessionId/element/:id/name |#### ์๋ฆฌ๋จผํธ์ ํ์๋๋ ํ
์คํธ ์ ๋ณด ํ์ธํ๊ธฐElement์ ํ
์คํธ๊ฐ์ ๋ฐํํฉ๋๋ค.[Table]| C\# | text = element.Text; ||:------|:-----------------------------------------|| Java | text = element.getText\(\); || ํต์ | GET /session/:sessionId/element/:id/text |๋
ธํธ:๋ฅ์ฌํฌ๋ก์์ ์ง์ ํ ์์ฑ๊ฐ์ ํ๋ฉด์ ๋ณด์ฌ์ง๋ ํ
์คํธ๋ฅผ ์ฐ์ ์ ์ผ๋ก ์ฒ๋ฆฌํฉ๋๋ค. ์ฐ์ ์์๋ ์๋์ ๊ฐ์ต๋๋ค.displaytext > text > titletext > value#### ์๋ฆฌ๋จผํธ ๋ง์ฐ์ค ํด๋ฆญ ์ด๋ฒคํธ ์ฒ๋ฆฌํ๊ธฐElement์ ๊ฐ์ด๋ฐ ์์น์์ ๋ง์ฐ์ค ํด๋ฆญ ์ด๋ฒคํธ๊ฐ ๋ฐ์ํฉ๋๋ค.[Table]| C\# | element.Click\(\); ||:------|:-------------------------------------------|| Java | element.click\(\); || ํต์ | POST /session/:sessionId/element/:id/click |์ฃผ์:์๋ฆฌ๋จผํธ์ ๊ฐ์ด๋ฐ ์์น์์ ๋ง์ฐ์ค ํด๋ฆญ ์ด๋ฒคํธ๊ฐ ๋ฐ์ํ๊ธฐ ๋๋ฌธ์ MaskEdit ์ปดํฌ๋ํธ ๊ฐ์ ๊ฒฝ์ฐ ์บ๋ฟ ์์น๊ฐ ๋งจ ์์ผ๋ก ์ด๋ํ์ง ์์ต๋๋ค. ์ด๋ฐ ๊ฒฝ์ฐ์๋ CTRL+"A" ํค๋ฅผ ์
๋ ฅํด์ ์
๋ ฅ ์์ญ ์ ์ฒด ์ ํ ํ ๋ฌธ์์ด์ ์
๋ ฅํ๋ ๋ฐฉ๋ฒ์ ์ฌ์ฉํ ์ ์์ต๋๋ค.์ฝ๋ 4- C#[TestMethod]public void Test_10_MaskEditInput(){ WindowsElement nexaMaskEdit00 = session.FindElementByAccessibilityId("mainframe.ChildFrame00.form.MaskEdit00"); Assert.IsNotNull(nexaMaskEdit00); Thread.Sleep(TimeSpan.FromSeconds(0.1)); nexaMaskEdit00.Clear(); nexaMaskEdit00.Click(); nexaMaskEdit00.SendKeys(Keys.Control + "a"); Thread.Sleep(TimeSpan.FromSeconds(0.1)); nexaMaskEdit00.SendKeys("abcde1234"+Keys.Enter); Assert.AreEqual("abcde-1234", nexaMaskEdit00.Text);}#### ์๋ฆฌ๋จผํธ ์
๋ ฅ๊ฐ ์ง์ฐ๊ธฐํ
์คํธ ํธ์ง ์์ญ์ ๊ฐ์ง๊ณ ์๋ ์ปดํฌ๋ํธ์ ์
๋ ฅ๊ฐ์ ์ง์๋๋ค.[Table]| C\# | element.Clear\(\); ||:------|:-------------------------------------------|| Java | element.clear\(\); || ํต์ | POST /session/:sessionId/element/:id/clear |#### ์๋ฆฌ๋จผํธ์ ํค๋ณด๋ ์
๋ ฅ๊ฐ ์ ๋ฌํ๊ธฐํค๋ณด๋ ์
๋ ฅ๊ฐ์ ์ฒ๋ฆฌํฉ๋๋ค.[Table]| C\# | element.SendKeys\(KeyString\) ||:------|:-------------------------------------------|| Java | element.sendKeys\(KeyString\) || ํต์ | POST /session/:sessionId/element/:id/value |๋
ธํธ:์ปดํฌ๋ํธ์ ๋ฐ๋ผ ์
๋ ฅ๊ฐ์ด ์ฒ๋ฆฌ๋๋ ๋ฐฉ์์ด ๋ค๋ฆ
๋๋ค.์ ํ ๋์๋ง์์ ์ปดํฌ๋ํธ์ "Basic Key Action" ํญ๋ชฉ์ ์ฐธ๊ณ ํด์ฃผ์ธ์.์ฃผ์:ํค๋ณด๋ ์
๋ ฅ ๊ฐ ์ ๋ฌ ์์๋ ํด๋น ์ฑ์ด ํ์ฑํ๋์ด ์์ด์ผ ํ๊ณ 2๊ฐ ์ด์์ ์๋์ฐ๊ฐ ํ์๋ ๊ฒฝ์ฐ ๋์ ๋์ ์๋์ฐ๊ฐ ํ์ฑํ๋์ด์ผ ํฉ๋๋ค.์ฃผ์:๋์ ๋์ ์๋ฆฌ๋จผํธ์ ๋ง์ฐ์ค ํด๋ฆญ ์ด๋ฒคํธ๋ฅผ ์ฒ๋ฆฌํ ํ ํค๋ณด๋ ์
๋ ฅ ๊ฐ์ ์ ๋ฌํด์ผ ์ ์์ ์ผ๋ก ๋์ํฉ๋๋ค.์ฃผ์:2๊ฐ ์ด์์ ๋์คํ๋ ์ด๋ฅผ ์ฌ์ฉํ๋ ๊ฒฝ์ฐ ํค๋ณด๋ ์
๋ ฅ ๊ฐ์ด ์ ์์ ์ผ๋ก ์ ๋ฌ๋์ง ์๋ ๊ฒฝ์ฐ๊ฐ ์์ต๋๋ค. ๋์คํ๋ ์ด๋ฅผ ํ๋๋ง ์ฌ์ฉํ๋์ง, WinAppDriver๋ฅผ ๋ค์ ์์ํด์ฃผ์ธ์.#### ์๋ฆฌ๋จผํธ ์ ํ ์ฌ๋ถ ํ์ธํ๊ธฐElement์ Selected ์ํ๊ฐ์ ๋ฐํํฉ๋๋ค.[Table]| C\# | isSelected = element.Selected; ||:------|:---------------------------------------------|| Java | isSelected = element.isSelected\(\); || ํต์ | GET /session/:sessionId/element/:id/selected |๋
ธํธ:๋ฅ์ฌํฌ๋ก์์ ์ง์ํ๋ ์ปดํฌ๋ํธ, ์ปจํธ๋กค์ ์๋์ ๊ฐ์ต๋๋ค.CheckBox, RadioButton, TabButton, ListBoxItem, MenuItem, TreeCell, GridCell#### ์๋ฆฌ๋จผํธ ์ฌ์ฉ ๊ฐ๋ฅ ์ฌ๋ถ ํ์ธํ๊ธฐElement์ Enabled ์ํ๊ฐ์ ๋ฐํํฉ๋๋ค.[Table]| C\# | isEnabled = element.Enabled; ||:------|:--------------------------------------------|| Java | isEnabled = element.isEnabled\(\); || ํต์ | GET /session/:sessionId/element/:id/enabled |#### ์๋ฆฌ๋จผํธ ํ๋ฉด ํ์ ์ฌ๋ถ ํ์ธํ๊ธฐElement์ ํ๋ฉด ํ์ ์ฌ๋ถ๋ฅผ ๋ฐํํฉ๋๋ค.[Table]| C\# | isDisplayed = element.Displayed; ||:------|:----------------------------------------------|| Java | isDisplayed = element.isDisplayed\(\); || ํต์ | GET /session/:sessionId/element/:id/displayed |๋
ธํธ:์ปดํฌ๋ํธ์ visible ์์ฑ๊ฐ์ ๋ฐํํ๋ ๊ฒ์ด ์๋๋ผ ์ค์ ํ๋ฉด์์์ ํ์ ์ฌ๋ถ๋ฅผ ๋ฐํํฉ๋๋ค.[Table]| element.Displayed | ์
๋ ฅ๋์ ||:---------------------|:----------------------------------------------------------------------------------------------------------------|| true | visible = true || | ํ๋ฉด ์์ญ์ ์ปดํฌ๋ํธ ์ ๋ถ ๋๋ ์ผ๋ถ๊ฐ ๋ณด์ฌ์ง๋ ๊ฒฝ์ฐ || false | visible = false || | visible = true ์ด์ง๋ง ์์ ์ปจํ
์ด๋ ์ปดํฌ๋ํธ์ ์คํฌ๋กค๋ฐ๋ฅผ ์ด๋ํ์ง ์์ผ๋ฉด ํ๋ฉด์ ๋ณด์ด์ง ์๋ ์์ญ์ ์์นํ ๊ฒฝ์ฐ |์ฃผ์:์ปดํฌ๋ํธ์ visible ์์ฑ๊ฐ์ false๋ก ์ค์ ํ๊ณ ์ฑ์ด ์์ํ๋ ๊ฒฝ์ฐ ํด๋น Element๋ฅผ ์ฐพ์ ์ ์์ต๋๋ค. ๋ฅ์ฌํฌ๋ก์์๋ visible ์์ฑ๊ฐ์ด true์ธ ๊ฒฝ์ฐ์๋ง Element๋ฅผ ์์ฑํ๊ธฐ ๋๋ฌธ์
๋๋ค.์ฑ ๋ก๋ ์์๋ visible ์์ฑ๊ฐ์ true๋ก ์ค์ ํ๊ณ onload ์ด๋ฒคํธ ํจ์ ๋ด์์ ์ปดํฌ๋ํธ์ visible ์์ฑ๊ฐ์ false๋ก ๋ณ๊ฒฝํ๋ฉด Element๋ฅผ ์ฒ๋ฆฌํ ์ ์์ต๋๋ค.#### ์๋ฆฌ๋จผํธ ํฌ๊ธฐ ์ ๋ณด ํ์ธํ๊ธฐElement ํฌ๊ธฐ๋ฅผ Size ์ค๋ธ์ ํธ ํํ๋ก ๋ฐํํฉ๋๋ค.[Table]| C\# | size = element.Size; ||:------|:-----------------------------------------|| Java | size = element.getSize\(\); || ํต์ | GET /session/:sessionId/element/:id/size |#### ์๋ฆฌ๋จผํธ ์์น ์ ๋ณด ํ์ธํ๊ธฐ (์์ ์๋ฆฌ๋จผํธ ๊ธฐ์ค)Element ์์น๋ฅผ ์์ Element ๊ธฐ์ค์์ Point ์ค๋ธ์ ํธ ํํ๋ก ๋ฐํํฉ๋๋ค.[Table]| C\# | size = element.Location; ||:------|:---------------------------------------------|| Java | size = element.getLocation\(\); || ํต์ | GET /session/:sessionId/element/:id/location |#### ์๋ฆฌ๋จผํธ ์์น ์ ๋ณด ํ์ธํ๊ธฐ (Screen ๊ธฐ์ค)Element ์์น๋ฅผ Screen ๊ธฐ์ค์์ Point ์ค๋ธ์ ํธ ํํ๋ก ๋ฐํํฉ๋๋ค.[Table]| C\# | size = element.LocationOnScreenOnceScrolledIntoView; ||:------|:--------------------------------------------------------|| Java | ์ง์ํ์ง ์์ || ํต์ | GET /session/:sessionId/element/:id/location_in_view |#### ํ์ฑํ๋ ์๋ฆฌ๋จผํธ ์ป๊ธฐํ์ฌ ํ์ฑํ๋ Element๋ฅผ ๋ฐํํฉ๋๋ค.[Table]| C\# | element = session.SwitchTo\(\).ActiveElement\(\); ||:------|:------------------------------------------------------|| Java | element = session.switchTo\(\).activeElement\(\); || ํต์ | GET /session/:sessionId/element/active |#### 2๊ฐ์ ์๋ฆฌ๋จผํธ ๋น๊ตํ๊ธฐElement๋ฅผ ๋น๊ตํด์ ๊ฐ์ Element์ธ์ง ํ์ธํฉ๋๋ค.[Table]| C\# | isEqual = element.Equals\(element2\); ||:------|:-------------------------------------------|| Java | isEqual = element.equals\(element2\); || ํต์ | GET /session/:sessionId/element/:id/equals |#### ์๋ฆฌ๋จผํธ์ UIA ์ธํฐํ์ด์ค ์์ฑ๊ฐ ํ์ธํ๊ธฐElement์ UIA Interface์ attribute ๊ฐ์ ์ ๊ณตํฉ๋๋ค.[Table]| C\# | element.GetAttribute\("AutomationId"\); ||:------|:----------------------------------------------------|| Java | element.getAttribute\("AutomationId"\); || ํต์ | GET /session/:sessionId/element/:id/attribute/:name |๋
ธํธ:Automation Element Property Identifiershttps://docs.microsoft.com/en-us/windows/desktop/WinAuto/uiauto-automation-element-propids### ScreenShot#### ์๋์ฐ, ์๋ฆฌ๋จผํธ ์คํฌ๋ฆฐ์ท ์ป๊ธฐScreen ์๋์ฐ ์์ญ ๋๋ Element๋ฅผ Screenshot ์ค๋ธ์ ํธ๋ก ๋ฐํํฉ๋๋ค.[Table]| C\# | Screenshot sessionshot = session.GetScreenshot\(\); ||:------|:-------------------------------------------------------|| Java | Screenshot sessionshot = session.getScreenshotAs\(\); || ํต์ | GET /session/:sessionId/screenshot || | GET /session/:sessionId/element/:id/screenshot |๋
ธํธ:SaveAsFile ๋ฉ์๋, AsBase64EncodedString ์์ฑ์ ์ฌ์ฉํด ์ด๋ฏธ์ง ํ์ผ ๋๋ Base64 ํํ๋ก ๋ณํํ ์ ์์ต๋๋ค.์ฃผ์:์๋์ฐ๊ฐ ์ต์์์ ๋
ธ์ถ๋์ด์ผ ์ ์์ ์ธ ์คํฌ๋ฆฐ์ท์ ์ป์ ์ ์์ต๋๋ค.์ฃผ์:Java ์ฝ๋์์๋ ๊ถํ์ด ์๋ ์ ์ฅ์๋ง ์ ๊ทผํ ์ ์์ต๋๋ค.์ฝ๋ 4- JavaFileHandler.copy(sessionshot, new File(System.getProperty("user.home")+"\\Downloads\\SessionScreenShot.png"));## ๊ด๋ จ ๋งํฌ ์ ๋ณดWebDriver Interfacehttp://www.w3.org/TR/webdriver1/https://www.seleniumhq.org/projects/webdriver/https://developer.mozilla.org/en-US/docs/Web/WebDriverAppDriver Interfacehttps://github.com/Microsoft/WinAppDriverhttps://appium.io/docs/en/drivers/windows/https://developer.microsoft.com/en-us/microsoft-edge/tools/webdriver/UIA Interfacehttps://docs.microsoft.com/en-us/windows/desktop/WinAuto/entry-uiauto-win32https://docs.microsoft.com/en-us/windows/desktop/winauto/testing-toolshttps://en.wikipedia.org/wiki/Microsoft_UI_AutomationMSAA Interfacehttps://docs.microsoft.com/en-us/windows/desktop/WinAuto/microsoft-active-accessibilityhttps://docs.microsoft.com/en-us/windows/desktop/winauto/testing-toolshttps://en.wikipedia.org/wiki/Microsoft_Active_Accessibility<|eot_id|>
|
<|begin_of_text|>๋ฅ์ฌํฌ๋ก ๊ฐ์ด๋ ๋ถ(์์ฉ๊ฐ๋ฐ ๊ฐ์ด๋) title: ์๋๋ก์ด๋ ์ด์์ฒด์ NRE์์ ๋จ์ ํ
์คํธ ์คํํ๊ธฐ contents: Appium ์ฐ๋ ๊ธฐ๋ฅ์ ๋ฅ์ฌํฌ๋ก์์ ์ ๊ณตํ๋ UIAutomation2 ์ธํฐํ์ด์ค๋ฅผ ์ฌ์ฉํด Android NRE์์ ์คํํ๋ ์ฑ์ ์์ฑ์ ์ฝ๊ฑฐ๋ ์ฐ๊ณ ํ๋ผ๋ฏธํฐ๋ฅผ ์ง์ ํด ๋ฉ์๋๋ฅผ ์คํํ๋ ๊ฒ์ ์ง์ํฉ๋๋ค. ์
๋ ๋์ ๊ฐ์ UI ์๋ํ ํ
์คํธ ๋๊ตฌ๋ฅผ ์ฌ์ฉํด ๋จ์ ํ
์คํธ๋ฅผ ์์ฑํ๊ณ ํ
์คํธํ ์ ์์ต๋๋ค.์ด๋ฒ ์ฅ์์๋ Appium๋ฅผ ์ค์นํ๊ณ ๋น์ฃผ์ผ ์คํ๋์ค ์ฝ๋์์ ๊ธฐ๋ณธ์ ์ธ Java ํ๋ก์ ํธ๋ฅผ ์์ฑํด ๋ฅ์ฌํฌ๋ก ์ฑ์ ์ฐ๊ฒฐํ๋ ๋จ๊ณ๋ฅผ ์ดํด๋ด
๋๋ค.๋
ธํธ:์๋ ๋ด์ฉ์ Appium 1.19.1, ์๋๋ก์ด๋ ์คํ๋์ค 4.1.1 ๋ฒ์ ์ ๊ธฐ์ค์ผ๋ก ์์ฑํ์ต๋๋ค.## Appium ์ฐ๋ ํ๊ฒฝ ์ค์ ํ๊ธฐ### Appium ์ค์นํ๊ณ ๋จ๋ง๊ธฐ ์ฐ๊ฒฐ ํ์ธํ๊ธฐ๋จ๊ณ 1. ์๋๋ก์ด๋ ์คํ๋์ค์ ์๋๋ก์ด๋ SDK, JDK๊ฐ ์ค์น๋์ด ์๋์ง ํ์ธํฉ๋๋ค.๋จ๊ณ 2. ํ
์คํธํ ๋จ๋ง๊ธฐ์ ๊ฐ๋ฐ์ ์ต์
์ ํ์ฑํํ๊ณ ์๋ 3๊ฐ ์ต์
์ ์ฌ์ฉ์ผ๋ก ์ฒดํฌํด์ค๋๋ค.USB debuggingInstall via USBUSB debugging (Security settings)๋จ๊ณ 3. ํ
์คํธ๋ฅผ ์งํํ PC์ Appium ์ค์นํ์ผ์ ๋ด๋ ค๋ฐ๊ณ ์ค์นํฉ๋๋ค.https://github.com/appium/appium-desktop/releases/latest๋จ๊ณ 4. ๋จ๋ง๊ธฐ์ PC๋ฅผ USB ์ผ์ด๋ธ์ ์ฌ์ฉํด ์ฐ๊ฒฐํฉ๋๋ค.๋จ๊ณ 5. adb ๋ช
๋ น์ด๋ก ์ฐ๊ฒฐ๋ ๋จ๋ง๊ธฐ ์ผ๋ จ๋ฒํธ๋ฅผ ํ์ธํฉ๋๋ค.์๋์์๋ "0a388e93"์ด ์ฐ๊ฒฐ๋ ๋จ๋ง๊ธฐ ์ผ๋ จ๋ฒํธ์
๋๋ค.$ adb devicesList of devices attached0a388e93 device usb:1-1 product:razor model:Nexus_7 device:flo๋จ๊ณ 6. ํ
์คํธํ ๋จ๋ง๊ธฐ์ ๋ฅ์ฌํฌ๋ก ์ฑ์ ์ค์นํฉ๋๋ค.์ฑ ๋น๋ ์ Package Name์ "nexacro", Program Name์ "TEST0120"์ผ๋ก ์ค์ ํ์ต๋๋ค.๋จ๊ณ 7. PC์์ Appium์ ์คํํฉ๋๋ค.๋จ๊ณ 8. [Start Server] ๋ฒํผ์ ํด๋ฆญํด Appium ์๋ฒ๋ฅผ ์์ํฉ๋๋ค.์๋์ฐ ์ด์์ฒด์ ํ๊ฒฝ์ด๋ผ๋ฉด Host ์ค์ ์ "127.0.0.1"๋ก ๋ณ๊ฒฝํฉ๋๋ค.๋จ๊ณ 9. [Start Inspector Session] ๋ฒํผ์ ํด๋ฆญํด Appium Inspector ์ฐฝ์ ๋์๋๋ค.๋จ๊ณ 10. [Custom Server] ํญ์์ JSON Representaion ํญ๋ชฉ์ ์๋์ ๊ฐ์ด ์
๋ ฅํฉ๋๋ค.{ "platformName": "Android", "platformVersion": "10", "appPackage": "nexacro.TEST0120", "appActivity": ".MainActivity", "automationName": "UIAutomator2", "autoGrantPermissions": "true", "deviceName": "0a388e93"}[Table]| ํญ๋ชฉ | ์ค๋ช
\(๊ตต๊ฒ ํ์ํ ํญ๋ชฉ์ ๊ณ ์ ๊ฐ\) ||:---------------------|:--------------------------------------------------------|| platformName | "Android" || platformVersion | ํ
์คํธํ ๋จ๋ง๊ธฐ ์ด์์ฒด์ ๋ฒ์ || appPackage | ํ
์คํธํ ์ฑ \(๋น๋ ์ ์ค์ ํ ๊ฐ\) || | \[Package Name\].\[Program Name\] ํ์ || appActivity | ์ฑ ๋น๋๋ก ๋น๋ํ ๊ฒฝ์ฐ์๋ ".MainActivity" || | ์๋๋ก์ด๋ ์คํ๋์ค์์ ๋น๋ํ ๊ฒฝ์ฐ์๋ ์ค์ ํ ์กํฐ๋นํฐ || automationName | "UIAutomator2" || autoGrantPermissions | "true" || deviceName | adb ๋ช
๋ น์ด๋ก ํ์ธํ ๋จ๋ง๊ธฐ ์ผ๋ จ๋ฒํธ |๋
ธํธ:์ถ๊ฐ๋ก ์ค์ ํ ์ ์๋ ํญ๋ชฉ์ ์๋ ๋งํฌ๋ฅผ ์ฐธ๊ณ ํ์ธ์.http://appium.io/docs/en/writing-running-appium/caps/๋จ๊ณ 11. [Start Session] ๋ฒํผ์ ํด๋ฆญํฉ๋๋ค.๋
ธํธ:์ต์ด ์คํ ์์๋ ๋จ๋ง๊ธฐ์ Appium Settings ์ฑ์ด ์ค์น๋ฉ๋๋ค.๋จ๊ณ 12. ํ
์คํธํ ๋จ๋ง๊ธฐ์์ ์ฑ์ด ์คํ๋๊ณ Appium Inspector ์ฐฝ์ ์ฑ์ด ์คํ๋ ์ํ๊ฐ ํ์๋๋์ง ํ์ธํฉ๋๋ค.### ํ
์คํธ ํ๋ก์ ํธ ์คํ ํ๊ฒฝ ์ค์ ํ๊ณ ํ
์คํธํ๊ธฐ๋จ๊ณ 1. Visual Studio Code๋ฅผ ์ค์นํฉ๋๋ค.๋จ๊ณ 2. ์ฌ์ด๋๋ฐ์์ Extensions๋ฅผ ์ ํํ๊ณ Java Extension Pack์ ์ค์นํฉ๋๋ค.๋จ๊ณ 3. ํ๋ก์ ํธ ์คํ์ ํ์ํ appium, selenium, testng ๋ผ์ด๋ธ๋ฌ๋ฆฌ๋ฅผ ์ค์ ํฉ๋๋ค.๋
ธํธ:Maven, Gradle, Eclipse plug-in ๋ฑ์ ์ค์ ์ ๊ด๋ จ ๋ฌธ์๋ฅผ ์ฐธ๊ณ ํ์ธ์.client-combined-3.141.59.jar (https://www.selenium.dev/downloads/)byte-buddy-1.8.15.jarcommons-exec-1.3.jarguava-25.0-jre.jarokhttp-3.11.0.jarokio-1.14.0.jartestng-7.3.0.jar (https://testng.org/doc/download.html)jcommander-1.78.jarjava-client-7.4.1.jar (https://github.com/appium/java-client)commons-lang3-3.11.jar (https://commons.apache.org/proper/commons-lang/)๋จ๊ณ 4. Java Project๋ฅผ ์์ฑํ๊ณ BaseClass.java ํ์ผ์ ์๋์ ๊ฐ์ด ์์ฑํฉ๋๋ค.package tests;import java.net.MalformedURLException;import java.net.URL;import org.openqa.selenium.remote.DesiredCapabilities;import org.testng.annotations.AfterTest;import org.testng.annotations.BeforeTest;import org.testng.annotations.Test;import io.appium.java_client.MobileElement;import io.appium.java_client.android.AndroidDriver;public class BaseClass { AndroidDriver<MobileElement> driver; final String URL_STRING = "http://127.0.0.1:4723/wd/hub"; @BeforeTest public void setup() { System.out.println("setup"); DesiredCapabilities capabilities = new DesiredCapabilities(); capabilities.setCapability("automationName", "UiAutomator2"); capabilities.setCapability("platformName", "Android"); capabilities.setCapability("platformVersion", "10"); capabilities.setCapability("deviceName", "0a388e93"); capabilities.setCapability("autoGrantPermissions", "true"); capabilities.setCapability("appPackage", "nexacro.TEST0120"); capabilities.setCapability("appActivity", ".MainActivity"); try { driver = new AndroidDriver<MobileElement>(new URL(URL_STRING), capabilities); } catch (MalformedURLException e) { System.out.println("MalformedURLException"); e.printStackTrace(); } catch (Exception e) { System.out.println("Exception"); e.printStackTrace(); } } @Test public void sampleTest() { System.out.println("sampleTest"); } @AfterTest public void teardown() { System.out.println("teardown"); driver.close(); }}๋จ๊ณ 5. ์ฌ์ด๋๋ฐ์์ Test๋ฅผ ์ ํํ๊ณ BaseClass ํญ๋ชฉ์ ์๋ [Run] ๋ฒํผ์ ํด๋ฆญํฉ๋๋ค.๋จ๊ณ 6. ํ
์คํธํ ๋จ๋ง๊ธฐ์์ ์ฑ์ด ์คํ๋๊ณ DEBUG CONSOLE์ ์ ์์ ์ผ๋ก ํ
์คํธ ์ฑ๊ณต ๋ฉ์์ง๊ฐ ํ์๋๋ ๊ฒ์ ํ์ธํฉ๋๋ค.## ๋จ์ ํ
์คํธ ๋ง๋ค๊ณ ์คํํ๊ธฐ๋จ๊ณ 1. ๋ฅ์ฌํฌ๋ก ์ฑ์ ์๋์ ๊ฐ์ด ์์ ํ๊ณ ์
๋ฐ์ดํธํฉ๋๋ค.์๋จ์ Button ์ปดํฌ๋ํธ๋ฅผ ๋ฐฐ์นํ๊ณ ๊ทธ ์๋์ Edit ์ปดํฌ๋ํธ๋ฅผ ๋ฐฐ์นํฉ๋๋ค.Button ์ปดํฌ๋ํธ์ onclick ์ด๋ฒคํธ ํธ๋ค๋ฌ ํจ์๋ฅผ ์๋์ ๊ฐ์ด ์์ฑํฉ๋๋ค.this.Button00_onclick = function(obj:nexacro.Button,e:nexacro.ClickEventInfo){ this.Edit00.set_value("BUTTON CLICK");};๋จ๊ณ 2. Tests.java ํ์ผ์ ์๋์ ๊ฐ์ด ์์ฑํฉ๋๋ค.package tests;import java.net.MalformedURLException;import java.util.concurrent.TimeUnit;import org.testng.annotations.Test;public class Tests extends BaseClass { @Test public void testOne() throws MalformedURLException, InterruptedException { System.out.println("testOne"); int nTestSpeed = 2000; driver.manage().timeouts().implicitlyWait(15, TimeUnit.SECONDS); driver.findElementById("mainframe.WorkFrame.form.Button00").click(); Thread.sleep(nTestSpeed); }}๋จ๊ณ 3. ์ฌ์ด๋๋ฐ์์ Test๋ฅผ ์ ํํ๊ณ Tests ํญ๋ชฉ์ ์๋ [Run] ๋ฒํผ์ ํด๋ฆญํฉ๋๋ค.๋จ๊ณ 4. ํ
์คํธํ ๋จ๋ง๊ธฐ์์ ์ฑ์ด ์คํ๋๊ณ Button ํด๋ฆญ ์ด๋ฒคํธ๊ฐ ์ ์์ ์ผ๋ก ์ฒ๋ฆฌ๋์ด Edit ์ปดํฌ๋ํธ์ ๊ฐ์ด ๋ณ๊ฒฝ๋๋์ง ํ์ธํฉ๋๋ค.## ์ง์ ์ธํฐํ์ด์ค[Table]| Method | Return | Argument | Requirement ||:--------------------------------------------------------------------------|:--------------------------------------------------------------------------|:--------------------------------------------------------------------------|:--------------------------------------------------------------------------|| AndroidDriver | AndroidDriver | AndroidDriver | AndroidDriver || driver.findElementById\("mainframe.WorkFrame.form.Button00"\) | driver.findElementById\("mainframe.WorkFrame.form.Button00"\) | driver.findElementById\("mainframe.WorkFrame.form.Button00"\) | driver.findElementById\("mainframe.WorkFrame.form.Button00"\) || findElement | WebElement | By by | || findElementById | WebElement | String id | || findElementByName | WebElement | String using | || findElementByClassName | WebElement | String using | || findElementByXPath | WebElement | String using | || getKeyboard | Keyboard | - | || pressKeyCode | - | AndroidKeyCode | || WebElement | WebElement | WebElement | WebElement || driver.findElementByClassName\("android.widget.CheckBox"\).click\(\); | driver.findElementByClassName\("android.widget.CheckBox"\).click\(\); | driver.findElementByClassName\("android.widget.CheckBox"\).click\(\); | driver.findElementByClassName\("android.widget.CheckBox"\).click\(\); || getText | String | - | || getAttribute | String | String name | || getClass | String | - | || getRect | Rectangle | - | || getSize | Dimension | - | || getLocation | Point | - | || isEnabled | Boolean | - | || click | - | - | || sendKeys | - | CharSequence... keysToSend | || TouchAction | TouchAction | TouchAction | TouchAction || TouchAction touch = new TouchAction\(driver\); | TouchAction touch = new TouchAction\(driver\); | TouchAction touch = new TouchAction\(driver\); | TouchAction touch = new TouchAction\(driver\); || touch.longPress\(PointOption.point\(500,1100\)\) | touch.longPress\(PointOption.point\(500,1100\)\) | touch.longPress\(PointOption.point\(500,1100\)\) | touch.longPress\(PointOption.point\(500,1100\)\) || .release\(\) | .release\(\) | .release\(\) | .release\(\) || .perform\(\); | .perform\(\); | .perform\(\); | .perform\(\); || longPress | PointOption | - | || waitAction | WaitOptions | - | || moveTo | PointOption | - | || release | - | - | || perform | - | - | || Keyboard | Keyboard | Keyboard | Keyboard || driver.getKeyboard\(\).sendKeys\("Keyboard Input Test"\); | driver.getKeyboard\(\).sendKeys\("Keyboard Input Test"\); | driver.getKeyboard\(\).sendKeys\("Keyboard Input Test"\); | driver.getKeyboard\(\).sendKeys\("Keyboard Input Test"\); || sendKeys | - | CharSequence... keysToSend | || pressKey | - | CharSequence... keysToSend | || releaseKey | - | CharSequence... keysToSend | |๋์ ์๋ฆฌ<|eot_id|>
|
<|begin_of_text|>๋ฅ์ฌํฌ๋ก ๊ฐ์ด๋ ๋ถ(์์ฉ๊ฐ๋ฐ ๊ฐ์ด๋) title: ํ๋ก์ ํธ ๋ฐ ํ์ผ ๊ตฌ์กฐ contents: ๋ฅ์ฌํฌ๋ก์์ ํ๋ฉด์ ๋ง๋ค๋ ค๋ฉด ๋จผ์ ํ๋ก์ ํธ๋ฅผ ์์ฑํด์ผ ํฉ๋๋ค. ๊ทธ๋ฆฌ๊ณ ํ๋ก์ ํธ์ ํ์ํ ์ปดํฌ๋ํธ, ์คํฌ๋ฆฐ ์ ๋ณด, ํ๊ฒฝ ์ ๋ณด, ํ
๋ง ๋๋ ์คํ์ผ ๋ฑ์ ํ์ผ์ ์์ฑํ๊ฑฐ๋ ๊ธฐ์กด ์ ๋ณด๋ฅผ ์ฐ๊ฒฐํฉ๋๋ค. ํ๋ฉด์ ์ฑ ํํ๋ก ์คํ๋ ์ ์์ผ๋ฉฐ Form ํ๋ฉด ์์ฒด๋ก ์คํ๋ ์ ์์ต๋๋ค.์ด๋ฒ ์ฅ์์๋ ํ๋ก์ ํธ๋ Form ์์ฑ ์ ์์
ํด๋์ ์์ฑ๋๋ ๊ฐ ํ์ผ์ ์ด๋ค ๊ฒ์ด ์์ผ๋ฉฐ ์ด๋ค ๊ธฐ๋ฅ์ ์ํํ๋์ง ์ค๋ช
ํฉ๋๋ค. ์ถ๊ฐ๋ก ์ ๋๋ ์ดํธ ๊ณผ์ ์ ๊ฑฐ์น๋ฉด์ ๋ณํ๋๋ ํ์ผ๋ ์ค๋ช
ํฉ๋๋ค.## ํ๋ก์ ํธ ์์ฑํ๋ก์ ํธ๋ ํ๋ฉด ๊ฐ๋ฐ์ ์ํ ๊ธฐ๋ณธ ์ค์ ์ ๋ณด๋ฅผ ๋ด๊ณ ์์ต๋๋ค. ํ๋ก์ ํธ๋ฅผ ์๋ก ๋ง๋ค๋ฉด ํ๋ก์ ํธ ์ค์ ํ์ผ ๋ฟ ์๋๋ผ ํ๋ก์ ํธ๋ฅผ ๊ตฌ์ฑํ๊ธฐ ์ํ ๊ธฐ๋ณธ์ ์ธ ํ์ผ์ด ํด๋น ํด๋์ ์์ฑ๋ฉ๋๋ค.์ผ๋ฐ์ ์ผ๋ก ํ๋ก์ ํธ ์์ฑ ์ ๋ง๋ค์ด์ง๋ ํ์ผ์ ์๋์ ๊ฐ์ต๋๋ค.[Table]| ํญ๋ชฉ | ํ์ฅ์ | ์ค๋ช
||:-----------------|:---------|:--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|| Nexacro Project | XPRJ | ํ๋ก์ ํธ ์ค์ ํ์ผ || | | \[ํ๋ก์ ํธ๋ช
\]\+ํ์ฅ์ || Application Info | XADL | Application ์ค์ ํ์ผ || | | ํ๋ก์ ํธ ์์ฑ ์ ์ค์ ํ ์คํฌ๋ฆฐ ์ ๋ณด์ ๊ธฐ๋ณธ ํ
๋ง ์ ๋ณด๋ฅผ ์์ฑ๊ฐ์ผ๋ก ์ง์ ํฉ๋๋ค. || | | ๊ธฐ๋ณธ ์์ฑ๋๋ ํ์ผ์ ๋ค์๊ณผ ๊ฐ์ ํํ์
๋๋ค. || | | \[ํ๋ก์ ํธ๋ช
\]\+ํ์ฅ์ || Type Definition | XML | ๋ชจ๋, ์ปดํฌ๋ํธ, ์๋น์ค, ํ๋กํ ์ฝ, ์
๋ฐ์ดํธ ์ ๋ณด ์ค์ ํ์ผ || | | ์์ฑ๋๋ ํ์ผ๋ช
์ typedefinition.xml ์
๋๋ค. || Environment | XML | Screen ์ ๋ณด, Variable, Cookie, HTTP Header ์ ๋ณด๋ฅผ ๊ด๋ฆฌํฉ๋๋ค. || | | ์์ฑ๋๋ ํ์ผ๋ช
์ environment.xml ์
๋๋ค. || AppVariables | XML | Application์์ ๊ณตํต์ผ๋ก ์ฌ์ฉํ ์ ์๋ Dataset, Variable ์ ๋ณด๋ฅผ ๊ด๋ฆฌํฉ๋๋ค. ํด๋น ์ ๋ณด๋ฅผ ์
๋ ฅํ์ง ์์๋ ํ์ผ์ ์์ฑ๋ฉ๋๋ค. || | | ์์ฑ๋๋ ํ์ผ๋ช
์ appvariables.xml ์
๋๋ค. || _resource_ | ํด๋ | Theme, InitValue, Image, font ๊ด๋ จ ๋ฆฌ์์ค๋ฅผ ๊ด๋ฆฌํฉ๋๋ค. || | | ์๋์ ๊ฐ์ ํ์ ํด๋๋ฅผ ์์ฑํฉ๋๋ค. || | | \[_font_\], \[_images_\], \[_initvalue_\], \[_theme_\], \[_xcss_\] || Base | ํด๋ | ์๋น์ค ํด๋ || | | ํ๋ก์ ํธ ์์ฑ ์ ๊ธฐ๋ณธ form ํ์
์๋น์ค๋ฅผ ์ง์ ํฉ๋๋ค. ๊ธฐ๋ณธ ์์ฑ๋๋ ์๋น์ค PrefixID๋ \[Base\]์
๋๋ค. ์์ฑ๋ PrefixID๋ ํด๋๋ช
์ ๋ค๋ฅธ ์ด๋ฆ์ผ๋ก ์์ ํ๊ฑฐ๋ ์ญ์ ํ ์ ์์ต๋๋ค. |๋
ธํธ:ํ๋ก์ ํธ ์์ฑ ์ [Frame] ํญ๋ชฉ ์ค์ ์ ๋ฐ๋ผ ์๋น์ค ํด๋๋ ์ถ๊ฐ๋ ์ ์์ต๋๋ค.์๋ฅผ ๋ค์ด ๋ ๊ฐ ์ด์์ ํ๋ ์์ ๊ฐ์ง๋ ํ๋ฉด์ ์ค์ ํ๋ค๋ฉด Frame ์๋น์ค ํด๋๊ฐ ์๋ ์์ฑ๋ฉ๋๋ค.### ํ๋ก์ ํธ ์ค์ ํ์ผ (XPRJ)ํ๋ก์ ํธ ์์ฑ ์ ์๋์ผ๋ก ์์ฑ๋ฉ๋๋ค. Application ์ค์ ํ์ผ ์ ๋ณด๋ ์ถ๊ฐํ๊ฑฐ๋ ์ญ์ ํ ์ ์์ต๋๋ค.<?xml version="1.0" encoding="utf-8"?><Project version="2.1"> <EnvironmentDefinition url="environment.xml"/> <TypeDefinition url="typedefinition.xml"/> <AppVariables url="appvariables.xml"/> <AppInfos> <AppInfo url="[file name].xadl"/> <AppInfo url="[file name].xadl"/> </AppInfos></Project>### Application ์ค์ ํ์ผ (XADL)ํ๋ก์ ํธ ์์ฑ ์ ์๋์ผ๋ก ์์ฑ๋๋ฉฐ ํ์์ ๋ฐ๋ผ ์ถ๊ฐ๋ก ์์ฑํ ์ ์์ต๋๋ค. ํ๋ก์ ํธ๋ ํ๋ ์ด์์ App Info๋ฅผ ํฌํจํด์ผ ํฉ๋๋ค. App Info๊ฐ ํ๋์ธ ๊ฒฝ์ฐ ์ด๋ฅผ ์ญ์ ํ๋ ค ํ๋ฉด ์๋์ ๊ฐ์ ๊ฒฝ๊ณ ๋ฉ์์ง๋ฅผ ๋ณด์ฌ์ฃผ๊ณ ์ญ์ ํ์ง ์์ต๋๋ค.<?xml version="1.0" encoding="utf-8"?><ADL version="2.0"> <Application id="[id]" screenid="[screen id]"> <Layout> <MainFrame/> </Layout> </Application> <Script type="xscript5.1"><![CDATA[โฆ]]></Script></ADL>Application ์ค์ ํ์ผ์ ์คํฌ๋ฆฝํธ ์ฝ๋๋ฅผ ์ถ๊ฐํ ์ ์์ต๋๋ค. ADL ๋๋ ๊ฐ ํ๋ ์ ์ค๋ธ์ ํธ์ ์ด๋ฒคํธ ์ฒ๋ฆฌ๋ Application ๋จ์์์ ์ฒ๋ฆฌํ ์คํฌ๋ฆฝํธ๋ฅผ ๊ด๋ฆฌํฉ๋๋ค.### Type Definition๋ชจ๋, ์ปดํฌ๋ํธ, ์๋น์ค, ํ๋กํ ์ฝ, ์
๋ฐ์ดํธ ์ ๋ณด ์ค์ ํ์ผ ์ ๋ณด๋ฅผ ๊ด๋ฆฌํฉ๋๋ค. ๊ฐ ํญ๋ชฉ์ ํ๋ก์ ํธ ์์ฑ ํ ์ถ๊ฐ, ๋ณ๊ฒฝ, ์ญ์ ํ ์ ์์ต๋๋ค. ํ๋กํ ์ฝ ์ ๋ณด์ ๋ฐฐํฌ ์ต์
์ ๋น๋ ๊ณผ์ ์์ ์๋์ผ๋ก ํธ์ง๋๊ธฐ๋ ํฉ๋๋ค.[Table]| | ํญ๋ชฉ | ์ค๋ช
||:-----------|:--------------|:-----------------------------------------------------------------------------------------------------------------|| Modules | ๋ชจ๋ ์ ๋ณด | ์๋ฐ์คํฌ๋ฆฝํธ๋ก ๊ฐ๋ฐ๋ ๋ชจ๋ ์ ๋ณด๋ฅผ ๋ด๊ณ ์์ต๋๋ค. || | | - ์์ฒด ๊ฐ๋ฐ๋ ๋ชจ๋์ ์ถ๊ฐํ ์ ์์ต๋๋ค. || | | - js ๋๋ json ํ์ผ ํํ๋ก ๋ฑ๋กํ ์ ์์ต๋๋ค. ๊ฐ ํ์ผ ๊ฐ์ ์์กด์ฑ์ ๊ฐ์ง ๋์๋ ์์์ ๋ง๊ฒ ๋ฑ๋กํด์ผ ํฉ๋๋ค. || Components | ์ค๋ธ์ ํธ ์ ๋ณด | ์ฑ ์คํ์ ํ์ํ ์ค๋ธ์ ํธ ์ ๋ณด๋ฅผ ๋ด๊ณ ์์ต๋๋ค. || | | - ์ง์ ๋ ์ค๋ธ์ ํธ๊ฐ ๋ฐฐํฌ์ ํฌํจ๋ฉ๋๋ค. || | | - ๊ฐ ์ค๋ธ์ ํธ๋ ๋ชจ๋์ ๊ธฐ๋ฐ์ผ๋ก ์ง์ ๋ฉ๋๋ค. || Services | ์๋น์ค ๊ทธ๋ฃน | ํ๋ก์ ํธ ๊ท๋ชจ์ ๋ฐ๋ผ ๋ด๋ถ์ ์ผ๋ก ์๋น์ค ๊ทธ๋ฃน์ ์ ์ํฉ๋๋ค. || | | - ๊ฐ ์๋น์ค ๊ทธ๋ฃน์ ๊ฐ๋ณ์ ์ผ๋ก ์บ์ ์์ค์ ์ค์ ํ ์ ์์ต๋๋ค. || Protocols | ํ๋กํ ์ฝ ์ ๋ณด | ํ๋กํ ์ฝ์ ๋ฑ๋ก/์ญ์ ํ๊ณ ์ฅ์น ํ์
์ ๋ง๊ฒ ํธ์งํฉ๋๋ค. || Update | ๋ฐฐํฌ ์ต์
| ์ฑ ๋ฐฐํฌ ๊ด๋ จ ์ ๋ณด๋ฅผ ์ง์ ํฉ๋๋ค. |<?xml version="1.0" encoding="utf-8"?><TypeDefinition version="3.0"> <Modules> <Module url="CompBase.json"/> <Module url="ComComp.json"/> <Module url="Grid.json"/> <Module url="DeviceAPI.json"/> </Modules> <Components> <Component type="JavaScript" id="Button" classname="nexacro.Button"/> <Component type="JavaScript" id="Combo" classname="nexacro.Combo"/> <Component type="JavaScript" id="Edit" classname="nexacro.Edit"/> ... </Components> <Services> <Service prefixid="theme" type="resource" url="./_resource_/_theme_/" version="0" communicationversion="0"/> <Service prefixid="initvalue" type="resource" url="./_resource_/_initvalue_/" version="0" communicationversion="0"/> <Service prefixid="xcssrc" type="resource" url="./_resource_/_xcss_/"/> <Service prefixid="imagerc" type="resource" url="./_resource_/_images_/"/> <Service prefixid="font" type="resource" url="./_resource_/_font_/" version="0" communicationversion="0"/> <Service prefixid="Base" type="form" cachelevel="session" url="./Base/" version="0" communicationversion="0"/> </Services> <Protocols/> <Update/></TypeDefinition>### EnvironmentScreen ์ ๋ณด, Variable, Cookie, HTTP Header ์ ๋ณด๋ฅผ ๊ด๋ฆฌํฉ๋๋ค. ํ๋ก์ ํธ๋ ํ๋ ์ด์์ Screen ์ ๋ณด๋ฅผ ํฌํจํด์ผ ํฉ๋๋ค. Screen ์ ๋ณด๊ฐ ํ๋์ธ ๊ฒฝ์ฐ ์ด๋ฅผ ์ญ์ ํ๋ ค ํ๋ฉด ์๋์ ๊ฐ์ ๊ฒฝ๊ณ ๋ฉ์์ง๋ฅผ ๋ณด์ฌ์ฃผ๊ณ ์ญ์ ํ์ง ์์ต๋๋ค.<?xml version="1.0" encoding="utf-8"?><ENV version="2.1"> <Environment themeid="theme::default" datatyperule="2.0"> <ScreenDefinition> <Screen id="[Screen id]" type="[type property value]"/> </ScreenDefinition> <Variables/> <Cookies/> </Environment></ENV>### AppVariablesApp์์ ๊ณตํต์ผ๋ก ์ฌ์ฉํ ์ ์๋ Dataset, Variable ์ ๋ณด๋ฅผ ๊ด๋ฆฌํฉ๋๋ค.<?xml version="1.0" encoding="utf-8"?><AppVariables version="2.0"> <Datasets> <Dataset id="[Dataset id]"> <ColumnInfo/> <Rows/> </Dataset> </Datasets> <Variables> <Variable id="[Variable id]" initval="[init value]"/> </Variables></AppVariables>## ๋ฆฌ์์ค### initValueํ๋ก์ ํธ ์์ฑ ์์๋ ํด๋๋ง ์์ฑํ๊ณ ํ์ผ์ ๋ง๋ค์ง๋ ์์ต๋๋ค. initValue ์ค์ ๊ฐ์ ์ ์ฅํ XML ํ์ผ์ ์์ฑํ๊ณ ํด๋น ํ์ผ์ ํ์ํ ์ค๋ธ์ ํธ์ ์์ฑ ์ ๋ณด๋ฅผ ์ง์ ํฉ๋๋ค. ํ์ผ์ ์์ฑํ๋ฉด ์ค๋ธ์ ํธ๋ฅผ ์ ํํ๊ณ initValue๋ฅผ ์ถ๊ฐํ ์ ์์ต๋๋ค. XML ํ์ผ ํ์์ด์ง๋ง ํ์ฅ์๋ .xiv์
๋๋ค.<?xml version="1.0" encoding="utf-8"?><GlobalPropInitvalueDefinition> <nexacro.Button> <initvalueid id="[initvalueid ]" ... /> </nexacro.Button> <nexacro.Edit> <initvalueid id="[initvalueid ]" ... /> </nexacro.Edit></GlobalPropInitvalueDefinition>### ํ
๋ง (XTHEME)ํ๋ก์ ํธ ์์ฑ ํ ๋ฅ์ฌํฌ๋ก ์คํ๋์ค [Resource Explorer] ์ฐฝ์ ํ์ธํด๋ณด๋ฉด ๊ธฐ๋ณธ ์ค์น ํ
๋ง๊ฐ ํฌํจ๋ [Nexacro Theme] ํญ๋ชฉ๊ณผ ์๋ก์ด ํ
๋ง๋ฅผ ์ถ๊ฐํ ์ ์๋ [Theme] ํญ๋ชฉ์ด ํ์๋ฉ๋๋ค. [Theme] ํญ๋ชฉ์๋ ๊ธฐ์กด ํ
๋ง๋ฅผ ๋ณต์ฌํด ๋ฃ๊ฑฐ๋ ์ ํ
๋ง๋ฅผ ๋ง๋ค ์ ์์ต๋๋ค.๊ธฐ๋ณธ ํ
๋ง๋ ์คํ์ผ ์ค์ ํ์ผ(theme.xcss)๊ณผ ์ด๋ฏธ์ง ํ์ผ ์งํฉ์ผ๋ก ๊ตฌ์ฑ๋ฉ๋๋ค.์ฃผ์:[Nexacro Theme] ํญ๋ชฉ ์๋์ ํ์๋๋ ํ
๋ง ํ์ผ์ ๋ณ๋ ์บ์ ๊ณต๊ฐ์ ์ ์ฅ๋์ด ๊ด๋ฆฌ๋ฉ๋๋ค. ๊ธฐ๋ณธ ํ
๋ง ํ์ผ์ ์์ ํ ์ ์์ต๋๋ค.### ImageResourceํ๋ก์ ํธ ๋ด์์ ๊ณตํต์ผ๋ก ์ฌ์ฉํ ์ ์๋ ์ด๋ฏธ์ง ํ์ผ์ ๊ด๋ฆฌํฉ๋๋ค. Image ๋ฆฌ์์ค๋ก ์ถ๊ฐํ ์ด๋ฏธ์ง ํ์ผ์ Form ์์ฑ ์ ์ด๋ฏธ์ง ํ์ผ์ด ํ์ํ ์์ฑ์ ์ง์ ํ ๋ ์์ฑ์ฐฝ์ ๋
ธ์ถ๋๋ฉฐ ํด๋น ์ด๋ฏธ์ง ํ์ผ์ ์์ฑ๊ฐ์ผ๋ก ์ง์ ํ ์ ์์ต๋๋ค.### UserFontํ๋ก์ ํธ ๋ด์์ ์ฌ์ฉํ ํฐํธ ํ์ผ์ ๊ด๋ฆฌํฉ๋๋ค. ํฐํธ ํ์ผ(woff, ttf, off)๊ณผ ํฐํธ๋ฅผ ์ ์ํ UserFont ํ์ผ์ ๊ด๋ฆฌํฉ๋๋ค. UserFont ํ์ผ์ xfont ํ์ฅ์๋ก ์ ์ฅ๋๋ฉฐ ์๋์ ๊ฐ์ ํ์์ผ๋ก ์์ฑํฉ๋๋ค.@font-face { font-family : 'NanumGothic'; font-style : normal; font-weight : 400; src : local("NanumGothic"), url(NanumGothic.ttf) format('truetype'), url(NanumGothic.eot), url(NanumGothic.eot?#iefix) format('embedded-opentype'), url(NanumGothic.wpff2) format('woff2'), url(NanumGothic.woff) format('woff'),}## ๊ธฐํ### Form (XFDL)์ฌ์ฉ์๊ฐ ์
๋ฌด๋ฅผ ์ํํ๊ธฐ ์ํด ์ ํ๋ ํ๋ฉด์ ์ ์ํ๊ณ ํ๋ฉด ๋ด์์ ๋ณด์ด์ง ์๊ฒ ์ฒ๋ฆฌ๋๋ ์ฐ์ฐ์ด๋ ์๋ฒ์ ๋ฐ์ดํฐ ํต์ ์ ์ํ ํ๋ก๊ทธ๋๋ฐ ์ฝ๋๋ฅผ ๋ด๊ณ ์์ต๋๋ค.[Table]| ์์ | ์ค๋ช
||:--------------|:---------------------------------------------------------------------------------------|| ์ปดํฌ๋ํธ ๋ฐฐ์น | Visible Object์ธ ์ปดํฌ๋ํธ๋ฅผ ๋ฐฐ์นํ๋ ์ ๋ณด๋ฅผ ๊ฐ๊ณ ์์ต๋๋ค. || | ์ปดํฌ๋ํธ์ ์์ฑ ๋ฐ ์ด๋ฒคํธ๋ฅผ ์ค์ ํฉ๋๋ค. || ์ค๋ธ์ ํธ ์ค์ | Dataset ๋ฑ Invisible Object์ Property ๋ฐ Event๋ฅผ ์ค์ ํฉ๋๋ค. || Script | Form์ ํฌํจํ ๋ชจ๋ ์ค๋ธ์ ํธ์ Event Function์ ์คํฌ๋ฆฝํธ๋ก ์์ฑํฉ๋๋ค. || | Event Function ์ธ์๋ ํ์ํ Function๋ค์ ์คํฌ๋ฆฝํธ๋ก ์์ฑํฉ๋๋ค. || BindItem | Form, ์ปดํฌ๋ํธ, Invisible Object๋ค๊ณผ Dataset์ ์ฐ๊ฒฐํ๋ BindItem Object๋ฅผ ์ค์ ํฉ๋๋ค. |<?xml version="1.0" encoding="utf-8"?><FDL version="2.1"> <Form> <Layouts> <Layout> <Button/> </Layout> </Layouts> <Script type="xscript5.1"><![CDATA[]]></Script> <Objects> <Dataset/> </Objects> <Bind> <BindItem/> </Bind> </Form></FDL>์ฃผ์:Form์์ ์คํ์ผ ์ค์ ํ์ผ์ ๋ณ๋ ์ง์ ํ ์๋ ์์ต๋๋ค.์คํ์ผ ์ค์ ํ์ผ์ Application ๋จ์๋ก๋ง ์ง์ ํ ์ ์์ต๋๋ค.### ์คํฌ๋ฆฝํธ (XJS)ํน์ Form์๋ง ํ์ํ ์คํฌ๋ฆฝํธ๋ Form ํ์ผ์ ๊ฐ์ด ์์ฑํ์ง๋ง, Application ๋ด ์ ์ฒด ํ๋ฉด์์ ์ฌ์ฉํ๋ ์คํฌ๋ฆฝํธ๋ ๋ณ๋ ์์ฑํ๊ณ ๊ฐ Form์์ ์ด๋ฅผ ์ฐธ์กฐํ๋๋ก ํฉ๋๋ค.์์ฑ๋ ์คํฌ๋ฆฝํธ๋ Form์์ ๋ค์๊ณผ ๊ฐ์ด ์ฐธ์กฐํ ์ ์์ต๋๋ค.include "lib::comLib.xjs"๊ณตํต์ผ๋ก ์ฐธ์กฐํ๋ ์คํฌ๋ฆฝํธ๊ฐ ๋ง์ ๊ฒฝ์ฐ ์ฌ๋ฌ ํ์ผ๋ก ๋ถ๋ฆฌํด ๊ด๋ฆฌํ ์๋ ์์ต๋๋ค. ์ฐธ์กฐํ๋ ํ์ผ์ด ๋ง์ ๊ฒฝ์ฐ์๋ ์คํฌ๋ฆฝํธ ์ฝ๋ ์์์ ๋ค์ ๋ค๋ฅธ ์ฝ๋๋ฅผ ์ฐธ์กฐํ๋๋ก ํฉ๋๋ค. ์๋ฅผ ๋ค์ด comLib.xjs ์คํฌ๋ฆฝํธ ํ์ผ์ ๋ค์๊ณผ ๊ฐ์ด ๊ตฌ์ฑํ ์ ์์ต๋๋ค. ์ด๋ ๊ฒ ๊ตฌ์ฑํ๋ฉด ์ฐธ์กฐํ ํ์ผ์ด ๋์ด๋๋๋ผ๋ ์
๋ฌด์์ ์ฌ์ฉํ๋ Form ํ์ผ์ ๊ฑด๋๋ฆฌ์ง ์๊ณ comLib.xjs ํ์ผ๋ง ์์ ํด ๊ธฐ๋ฅ์ ์ถ๊ฐํ ์ ์์ต๋๋ค.include "lib::comConstants.xjs";include "lib::comService.xjs";include "lib::comForm.xjs";include "lib::comGrid.xjs"; include "lib::comUtil.xjs";include "lib::comDataset.xjs";### ์คํ์ผ ์ค์ ํ์ผ (XCSS)CSS ํ์ค์ด ์์ง๋ง, ์ฌ์ ํ ์น๋ธ๋ผ์ฐ์ ๋ง๋ค ์ ์ฉ๋๋ ๋ฐฉ์์ด ๋ค๋ฆ
๋๋ค. ๊ทธ๋์ ๊ฐ๋ฐ ๊ณผ์ ์์ ํน์ ๋ธ๋ผ์ฐ์ ๋ง๋ค ํ์ํ CSS ์์ฑ์ ์ง์ ํด์ฃผ์ด์ผ ํฉ๋๋ค. ๋ฅ์ฌํฌ๋ก๋ CSS ํ์ค์ ๋ฐ๋ผ ํ๋์ ์ฝ๋๋ง ์์ฑํด์ฃผ๋ฉด ๋น๋ ๊ณผ์ ์์ ๊ฐ ๋ธ๋ผ์ฐ์ ์ ๋ง๋ CSS ์ฝ๋๋ฅผ ์๋์ผ๋ก ์์ฑํฉ๋๋ค.<?xml version="1.0" encoding="utf-8"?><XCSS type="xcss1.0"><![CDATA[.Button{ background : #c0504d; -nexa-text-align : left;}]]></XCSS>์คํ์ผ ์ค์ ํ์ผ์ ์์ ์์ ์ฒ๋ผ ํ์ค CSS ์์ฑ๊ณผ ๋ฅ์ฌํฌ๋ก์์ ์ถ๊ฐ ์ง์ํ๋ ์์ฑ์ด ๊ฐ์ด ์ง์ ๋ ๊ฒฝ์ฐ ๋น๋ ๊ณผ์ ์์ ์๋์ ๊ฐ์ CSS ์ฝ๋๊ฐ ์์ฑ๋ฉ๋๋ค..Button{ background : #c0504d;}.Button .nexacontentsbox{ text-align : left;}์ฃผ์:์คํ์ผ ์ค์ ํ์ผ์ XML ํ์์ผ๋ก ์์ฑํฉ๋๋ค. ๋ํ, ๋ด๋ถ์์ ์ฌ์ฉํ๋ ์ฝ๋๊ฐ ํ์ค CSS๋ฅผ ์ค์ํ๋ ๊ฒ์ด์ง ๋ชจ๋ CSS ์์ฑ์ ์ง์ํ๋ ๊ฒ์ ์๋๋๋ค.์ฃผ์:์คํ์ผ ์ค์ ํ์ผ์ Application ๋จ์๋ก๋ง ์ง์ ํ ์ ์์ต๋๋ค.์ ์ฒด ํ๋ก์ ํธ ์คํ์ผ์ ํ
๋ง, Application ๋จ์ ์คํ์ผ์ ์คํ์ผ ์ค์ ํ์ผ์ ์ฌ์ฉํฉ๋๋ค.<|eot_id|>
|
<|begin_of_text|>๋ฅ์ฌํฌ๋ก ๊ฐ์ด๋ ๋ถ(์์ฉ๊ฐ๋ฐ ๊ฐ์ด๋) title: ์ฑ ๊ตฌ๋ ์๋๋ฆฌ์ค contents: ๋ฅ์ฌํฌ๋ก ์ฑ์ด ์คํ๋๋ ๊ณผ์ ์ ์๋์ ๊ฐ์ต๋๋ค.
## bootstrap
Application์ ๋ก๋ฉํ๊ธฐ ์ํด ๊ด๋ จ ์ ๋ณด๋ฅผ ํ์ธํ๊ณ ํ์ํ ์์์ ๊ฐ์ ธ์ค๋ ๊ณผ์ ์ ์ค๋ช
ํฉ๋๋ค. ์ด ๊ณผ์ ์ ๋ถํธ์คํธ๋ฉ์ด๋ผ๊ณ ํํํฉ๋๋ค.
[Table]
| | WRE | NRE |
|:---|:-----------------------|:-------------------------|
| | index.html | start.json |
| | | start_android.json |
| | | start_ios.json |
| | get bootstrap info | get bootstrap info |
| | | update engine |
| | | update resource \(data\) |
| | load framework files | load framework files |
| | load component modules | load component modules |
| | load Application | load Application |
ํ:
์ผ๋ฐ์ ์ผ๋ก ๋ถํธ์คํธ๋ฉ์ ์ปดํจํฐ๊ฐ ์ธ๋ถ ์
๋ ฅ ์์ด ์ค์ค๋ก ์์ํ ์ค๋น๋ฅผ ํ๋ ๊ณผ์ ์ ์๋ฏธํฉ๋๋ค. ์ฃผ๋ก ๋ฉ๋ชจ๋ฆฌ์ ๋ด๊ธด ์ ๋ณด๋ฅผ ๊ธฐ๋ฐ์ผ๋ก ๋์ํ๋ฉฐ ๋ถํ
(booting)์ด๋ผ๊ณ ํํํ๊ธฐ๋ ํฉ๋๋ค.
https://en.wikipedia.org/wiki/Bootstrapping
๋ฅ์ฌํฌ๋ก ์ฑ ์คํ๊ณผ์ ์์ ์ฌ์ฉํ๋ ๋ถํธ์คํธ๋ฉ์ด๋ผ๋ ์ฉ์ด๋ ์ฑ์ ์์ํ ์ค๋น๋ฅผ ํ๋ ๊ณผ์ ์ด๋ผ๋ ํํ์ ๋ด๊ณ ์์ต๋๋ค.
## Application ๋ก๋ฉ
์ฑ์ด ์คํ๋๊ธฐ ์ํด Application๊ณผ ์ฐ๊ฒฐ๋ ํผ์ ๋ก๋ฉํ๋ ๊ณผ์ ์ ์๋์ ๊ฐ์ต๋๋ค.
[Table]
| | ๋ก๋ฉ ์์ | ์ด๋ฒคํธ ๋ฐ์ |
|:---|:------------------------------------------------------------|:-----------------------------------|
| | Environment ๋ก๋ฉ | |
| | Screen ์ ํ \(Screen ์ ๋ณด๊ฐ 2๊ฐ ์ด์์ธ ๊ฒฝ์ฐ\) | |
| | Screen ํ๊ฒฝ ์ ๋ณด ๋ก๋ฉ | |
| | - ์ ํ๋ Screen ์ ๋ณด๋ฅผ screenid ์์ฑ๊ฐ์ผ๋ก ์ง์ ํ App ํ์ธ | |
| | - Applicaiton ์ค๋ธ์ ํธ ์์ฑ | |
| | Environment ์ค์ ์ฒ๋ฆฌ \(Typedefinition, ์์ฑ, Variables\) | |
| | Environment ์ค์ ์ฒ๋ฆฌ \(Typedefinition, ์์ฑ, Variables\) | Environment.onload |
| | ํ
๋ง ๋ก๋ฉ \(css, map.js ํ์ผ\) | |
| | Initvalue ํ์ผ ๋ก๋ฉ | |
| | Application ๋ก๋ฉ \(\*.xadl.js ํ์ผ\) | |
| | - Application ์์ฑ ์ค์ | |
| | - Application ์์ฑ ์ค์ | Application.onloadingappvariables |
| | - Mainframe ์์ฑ ๋ฐ ์ด๊ธฐํ | |
| | - Mainframe ์์ฑ ๋ฐ ์ด๊ธฐํ | MainFrame.onactivate |
| | - Frame ์์ฑ ๋ฐ ์ด๊ธฐํ | |
| | - Frame ์์ฑ ๋ฐ ์ด๊ธฐํ | ChildFrame.onactivate |
| | - Frame ์์ฑ ๋ฐ ์ด๊ธฐํ | Application.onload |
| | Form ๋ก๋ฉ \(\*.xfdl.js ํ์ผ\) | |
| | Form ๋ก๋ฉ \(\*.xfdl.js ํ์ผ\) | Form.oninit |
| | Form ๋ก๋ฉ \(\*.xfdl.js ํ์ผ\) | Form.onload |
| | Form ๋ก๋ฉ \(\*.xfdl.js ํ์ผ\) | Form.onactivate |
| | Form ๋ก๋ฉ \(\*.xfdl.js ํ์ผ\) | Application.onloadforms |
์ฃผ์:
๋ก๋ฉ ์์์ ๋ฐ๋ผ ์์ง ์์ฑ๋์ง ์๋ ํญ๋ชฉ์ ์ฌ์ฉํ ์ ์์ต๋๋ค.
์๋ฅผ ๋ค์ด Environment.onload ์ด๋ฒคํธ ํจ์ ๋ด์์ AppVariables์ ์ ๊ทผํ๊ฒ ๋๋ฉด undefined๋ก ํ์๋ฉ๋๋ค.
this.Environment_onload = function(obj:nexacro.Environment,e:nexacro.LoadEventInfo)
{
trace(nexacro.getApplication().all['Variable0']); //undefined
}
## ํผ ๋ก๋ฉ
์์์ ์ค๋ช
ํ Application ๋ก๋ฉ ํญ๋ชฉ์์ 'Form ๋ก๋ฉ'๋ถํฐ 'Form.onload ์ด๋ฒคํธ ๋ฐ์' ์ฌ์ด์ ๊ณผ์ ์ ์ข ๋ ์์ธํ ์ดํด๋ณด๋ฉด ์๋์ ๊ฐ์ต๋๋ค.
Form ๋ก๋ฉ
Form ์คํ
์๋ธํ์ผ ๋ค์ด๋ก๋ ๋ฐ ์คํ
Form ์ด๊ธฐํ
Form Style ์์ฑ ์ค์
Form ์์ฑ ์ค์
์ค๋ธ์ ํธ, ์ปดํฌ๋ํธ, ๋ฐ์ธ๋์์ดํ
(BindItem) ์์ฑ
์์ง ๋ด๋ถ์์ ์ฒ๋ฆฌํ๋ ์คํฌ๋ฆฝํธ ์ํ
์ด๋ฒคํธํธ๋ค๋ฌ ๋ฑ๋ก
์ค๋ธ์ ํธ, ์ปดํฌ๋ํธ ๋ฉ์๋ ํธ์ถ: Object.createComponent
์ด๋ฒคํธ ๋ฐ์: Form.oninit
๋ฉ์๋ ํธ์ถ: Form.on_created
์ค๋ธ์ ํธ, ์ปดํฌ๋ํธ ๋ฉ์๋ ํธ์ถ: Object.on_created
์ด๋ฏธ์ง ๋ก๋ฉ, transaction ์ฒ๋ฆฌ
์ด๋ฒคํธ ๋ฐ์: Form.onload
๋
ธํธ:
์๋ธํ์ผ์ include ๋ฐฉ์์ผ๋ก ์ฐ๊ฒฐ๋๋ ์คํฌ๋ฆฝํธ ํ์ผ ๋ฑ์ ์๋ฏธํฉ๋๋ค.
๋
ธํธ:
Form์ ํฌํจ๋ Object, Component๋ ์ง์ ๋ Z-Order ์์๋๋ก ์์ฑํฉ๋๋ค.
์ฃผ์:
div, tab ์ปดํฌ๋ํธ๋ url ์์ฑ์ผ๋ก ์ฐ๊ฒฐ๋ Form์ ๊ฐ์ ธ์ค๋ ๋คํธ์ํฌ ์๋์ ๋ฐ๋ผ ๋ก๋ฉ์ด ๋๋๋ ์์ ์ด ๋ฌ๋ผ์ง ์ ์์ต๋๋ค.
<|eot_id|>
|
<|begin_of_text|>๋ฅ์ฌํฌ๋ก ๊ฐ์ด๋ ๋ถ(์์ฉ๊ฐ๋ฐ ๊ฐ์ด๋) title: ๋ฅ์ฌํฌ๋กํ๋ซํผ ์คํฌ๋ฆฝํธ ์ธ์ด contents: ๋ฅ์ฌํฌ๋ก ์ฑ์ ๊ฐ๋ฐํ ๋๋ ์๋ฐ์คํฌ๋ฆฝํธ ๋ฌธ๋ฒ์ ๊ธฐ๋ณธ์ ์ผ๋ก ์ฌ์ฉํฉ๋๋ค. ์๋ฐ์คํฌ๋ฆฝํธ ๊ธฐ๋ณธ ๋ฌธ๋ฒ์์ ์ ๊ณตํ์ง ์๋ ์ถ๊ฐ์ ์ธ ๊ธฐ๋ฅ์ ์ฒ๋ฆฌํ๊ธฐ ์ํด ๋ณ๋ API๋ฅผ ์ ๊ณตํฉ๋๋ค. ์์ฑ๋ ์คํฌ๋ฆฝํธ ์ฝ๋๋ ๋น๋ ๊ณผ์ ์ ๊ฑฐ์ณ ๊ทธ๋๋ก ์น ๋ธ๋ผ์ฐ์ ๋ ๋ชจ๋ฐ์ผ ๋๋ฐ์ด์ค์์ ๋์ํ๋๋ก ์๋ฐ์คํฌ๋ฆฝํธ ์ฝ๋๋ก ๋ณํ๋ฉ๋๋ค.
์ด๋ฒ ์ฅ์์๋ ๋ฅ์ฌํฌ๋ก์์ ์คํฌ๋ฆฝํธ ์์ฑ ์ ๊ธฐ๋ณธ์ ์ผ๋ก ์์์ผ ํ๋ ๋ฌธ๋ฒ์ ์ธ ์์์ ์ฃผ์ ์ฌํญ์ ์ค๋ช
ํฉ๋๋ค.
## ์ ํจ๋ฒ์(Scope)
์ ํจ๋ฒ์๋ ์ ๊ทผ ๊ฐ๋ฅํ ๋ณ์์ ๋ฒ์์ ๊ด๋ จ๋ ๋ด์ฉ์ ์ค๋ช
ํฉ๋๋ค. ์ ํจ๋ฒ์ ๋๋ ์์ญ์ด๋ผ๊ณ ํ๊ธฐํ๋ฉฐ ์๋ฌธ ํ๊ธฐ ๊ทธ๋๋ก ์ฌ์ฉํ๊ธฐ๋ ํฉ๋๋ค. ์
๋ฌด์ ์ฌ์ฉํ๋ ์ฑ์ ์ฌ๋ฌ ๊ฐ์ ํ๋ฉด์ ๋์์ ์กฐ์ํ๊ฑฐ๋ ํ๋์ ๋ณ์๋ฅผ ์ฌ๋ฌ ํ๋ฉด์์ ์ฐธ์กฐํ๋ ๊ฒฝ์ฐ๊ฐ ๋ง์ต๋๋ค. ์ ํจ๋ฒ์๋ฅผ ์ฌ์ฉํ๋ฉด ์ํ๋ ์์์ ์ ํํ๊ฒ ์ ๊ทผํ ์ ์์ต๋๋ค.
### ๋ก์ปฌ (local)
๋ฅ์ฌํฌ๋ก์ Form ์คํฌ๋ฆฝํธ์์ ์ฒซ ๋ฒ์งธ ์ค์ ์๋์ ๊ฐ์ ์ฝ๋๊ฐ ์๋ ๊ฒฝ์ฐ ๋ก์ปฌ ๋ณ์๋ก ์ฒ๋ฆฌ๋ฉ๋๋ค. ์ผ๋ฐ์ ์ธ ์๋ฐ์คํฌ๋ฆฝํธ ์ฝ๋์๋ค๋ฉด ์ ์ญ ๋ณ์๋ก ์ฒ๋ฆฌ๋ฉ๋๋ค. ํ์ง๋ง ๋ฅ์ฌํฌ๋ก๋ ๊ทธ๋ ์ง ์์ต๋๋ค.
var value0 = 0;
ํด๋น ์ฝ๋๊ฐ ๋น๋ ๊ณผ์ ์ ๊ฑฐ์ณ ๋ธ๋ผ์ฐ์ ์์ ๋์ํ๋ ์ฝ๋๋ฅผ ๋ณด๋ฉด ์ด๋ค ์ฐจ์ด๊ฐ ์๋์ง ํ์ธํ ์ ์์ต๋๋ค. ๋น๋ ๊ณผ์ ์ ๊ฑฐ์น ์ฝ๋๋ ์๋์ ๊ฐ์ต๋๋ค. ์ฒซ ๋ฒ์งธ ์ค์ ์ ์๋ ๋ณ์๊ฐ ์๋์ผ๋ก ์์ฑ๋ ํจ์ ๋ด์ ํฌํจ๋๋ฉด์ ๋ก์ปฌ ๋ณ์๋ก ์ฒ๋ฆฌ๋ฉ๋๋ค.
this.registerScript("TEST.xfdl", function() {
var value0 = 0;
});
์ฃผ์:
Form ์คํฌ๋ฆฝํธ์์ ์ ์ญ ๋ณ์๋ฅผ ์ฒ๋ฆฌํ๊ณ ์ ํ๋ค๋ฉด var ํค์๋๋ฅผ ์ฌ์ฉํ์ง ์๊ณ ๋ณ์๋ฅผ ์ ์ํ ์ ์์ต๋๋ค. ํ์ง๋ง ์ ์ญ ๋ณ์๋ฅผ ์ฌ์ฉํ๋ฉด ์ฑ ์ ์ฒด์ ์ํฅ์ ๋ฏธ์น ์ ์์ด ์ ์ ํ ์ ํจ๋ฒ์๋ฅผ ์ง์ ํด์ฃผ์ด์ผ ํฉ๋๋ค.
ํจ์ ๋ด์์ ์ ์ธ๋ ๋ณ์๋ ์ ํจ๋ฒ์๋ฅผ ๋ฐ๋ก ์ง์ ํ์ง ์๊ณ ์ฌ์ฉํ ์ ์์ผ๋ฉฐ ๋งค๊ฐ๋ณ์๋ก ์ ๋ฌ๋ ๊ฐ ์ญ์ ์ ํจ๋ฒ์๋ฅผ ์ง์ ํ์ง ์๊ณ ์ฌ์ฉํ ์ ์์ต๋๋ค.
this.Button00_onclick = function(obj:nexacro.Button, e:nexacro.ClickEventInfo)
{
obj.set_text("button");
var a = 3;
trace(a); // 3
}
### this
Application ๋๋ Form์์ ์ฌ์ฉ๋๋ ํญ๋ชฉ์ ๋ํด ์ ํจ๋ฒ์๋ฅผ ์ง์ ํ ๋๋ ํญ์ this๋ฅผ ์ฌ์ฉํฉ๋๋ค. ๋ณ์๋ฟ ์๋๋ผ ์์ฑ, Form ๊ฐ์ ์ฐธ์กฐ ์์๋ ์ ์ ํ ์ ํจ๋ฒ์๋ฅผ ์ง์ ํด์ฃผ์ด์ผ ํฉ๋๋ค.
Form ๋ด์์ ๋ณ์๋ ์๋์ ๊ฐ์ด ์ ์ธํฉ๋๋ค.
this.formvalue = 4;
ํจ์๋ฅผ ์ ์ธํ ๋๋ ์ ํจ๋ฒ์๋ฅผ ์ง์ ํด์ฃผ์ด์ผ ํฉ๋๋ค. ๋ํ, ํจ์๋ฅผ ์์ฑํ ๋ Form ๋ด์ ์ ์ธ๋ ๋ณ์๋ฅผ ์ฐธ์กฐํ ๋๋ ์ ํจ๋ฒ์๋ฅผ ์ง์ ํด์ฃผ์ด์ผ ํฉ๋๋ค.
this.formvalue = 4;
this.test = function()
{
this.formvalue = 3;
this.parent.value = 3;
this.parent.parent.value = 3;
}
trace๋ alert์ ๊ฐ์ ๋ฉ์๋๋ ์ง์ ๋ ์ ํจ๋ฒ์์ ๋ฐ๋ผ ์๋ฐ์คํฌ๋ฆฝํธ ๊ธฐ๋ณธ ๋ฌธ๋ฒ์์ ์ ๊ณตํ๋ ๋ฉ์๋๋ฅผ ์ฌ์ฉํ๊ฑฐ๋ ๋ฅ์ฌํฌ๋ก์์ ์ถ๊ฐ๋ก ์ ๊ณตํ๋ ๋ฉ์๋๋ฅผ ์ฌ์ฉํ ์ ์์ต๋๋ค. ์ ํจ๋ฒ์๋ฅผ ์ง์ ํ์ง ์๊ณ alert ๋ฉ์๋๋ฅผ ์ฐ๋ ๊ฒ๊ณผ this ์ ํจ๋ฒ์๋ฅผ ์ง์ ํ๋ ๊ฒ์ ์ ํ ๋ค๋ฅธ ๋ฉ์๋๊ฐ ์คํํ๋ ๊ฒ์
๋๋ค.
this.Button00_onclick = function(obj:nexacro.Button, e:nexacro.ClickEventInfo)
{
alert(e.button); // JavaScript
this.alert(e.button); // Form.alert()
nexacro.getApplication.alert(e.button); // Application.alert()
}
ํจ์ ์ ์ธ ์์๋ ์ ํจ๋ฒ์๋ฅผ ์ง์ ํด ํด๋นํ๋ Application ๋๋ Form์ ๋ฉค๋ฒ๋ก ํฌํจ๋๋๋ก ํฉ๋๋ค.
this.Button00_onclick = function(obj:nexacro.Button, e:nexacro.ClickEventInfo)
{
...
}
eval ํจ์๋ก Form์ ์ ๊ทผํ๋ ๊ฒฝ์ฐ์๋ this๋ฅผ ์ฌ์ฉํด์ผ ํฉ๋๋ค.
eval("this.formfunc()");
์ฃผ์:
์๋์ ๊ฐ์ด ํจ์๋ฅผ ์ง์ ์ ์ธํ ์๋ ์์ง๋ง, Global๋ก ์ฒ๋ฆฌ๋๋ฉฐ ์ดํ ์ง์์ด ์ค๋จ๋ ์ ์์ผ๋ฏ๋ก ๊ถ์ฅํ์ง ์์ต๋๋ค.
function Button00_onclick(obj:nexacro.Button, e:nexacro.ClickEventInfo)
{
...
}
### Global
๋ฅ์ฌํฌ๋ก ์คํฌ๋ฆฝํธ ๋ด์์ ์ ํจ๋ฒ์๋ฅผ ์ง์ ํ์ง ์์ ๋ณ์๋ ํจ์๋ ๋ชจ๋ ์ต์์ Global ๋ฉค๋ฒ๋ก ์ฒ๋ฆฌ๋ฉ๋๋ค. ์๋์ ๊ฐ์ด ์ ํจ๋ฒ์๋ฅผ ์ง์ ํ์ง ์๊ณ ์ฌ์ฉ๋ ์คํฌ๋ฆฝํธ๋ ๋ชจ๋ Global๋ก ์ฒ๋ฆฌ๋ฉ๋๋ค.
globalvar = 2;
var globalvar2 = 3;
ํจ์ ๋ด์ ์ฌ์ฉ๋ ๋ณ์๋ผ๋ ์ ํจ๋ฒ์๋ฅผ ์ง์ ํ์ง ์์ผ๋ฉด ๋ชจ๋ Global๋ก ์ฒ๋ฆฌ๋ฉ๋๋ค. ๋จ var ํค์๋๋ฅผ ์ฌ์ฉํด ์ ์ํ ๋ณ์๋ ํจ์ ๋ฐ์์ ์ฌ์ฉํ ์ ์์ต๋๋ค.
this.test = function()
{
trace(globalvar); //2
trace(globalvar2); //3
value = 4;
var localvar = 5;
}
this.test = function()
{
trace(value); // 4
trace(localvar); // ReferenceError: localvar is not defined
}
์ฃผ์:
Form ๋ด์์ ๋ค๋ฅธ ์คํฌ๋ฆฝํธ ํ์ผ์ include ํ๋ ๊ฒฝ์ฐ์๋ ๋ด๋ถ์ ์ผ๋ก ์คํฌ๋ฆฝํธ๋ฅผ ํจ์๋ก ์ฒ๋ฆฌํฉ๋๋ค. ๊ทธ๋์ var ํค์๋๋ฅผ ์ฌ์ฉํ ๋ ์ฃผ์ํด์ผ ํฉ๋๋ค.
์๋ฅผ ๋ค์ด includecode.xjs ํ์ผ ๋ด ์ ์๋ ๋ณ์๊ฐ ์ค์ generate ๋ includecode.xjs.js ์ฝ๋๋ ์๋์ ๊ฐ์ต๋๋ค (generate ๋ ์ฝ๋๋ ๋ฒ์ ์ ๋ฐ๋ผ ๋ฌ๋ผ์ง ์ ์์ต๋๋ค).
์ฝ๋ 8- includecode.xjs
bbb = "bbb";
var ccc = "ccc";
์ฝ๋ 8- includecode.xjs.js
(function()
{
return function(path)
{
var obj;
// User Script
this.registerScript(path, function() {
bbb = "bbb";
var ccc = "ccc";
});
this.loadIncludeScript(path);
obj = null;
};
}
)();
ํจ์๋ฅผ ์ ์ธํ๊ฑฐ๋ ํธ์ถํ ๋๋ ์ ํจ๋ฒ์๋ฅผ ์ง์ ํด์ฃผ์ด์ผ ํฉ๋๋ค. ์๋ ์คํฌ๋ฆฝํธ์์ test()์ this.test()๋ ์๋ก ๋ค๋ฅธ ํจ์๋ฅผ ํธ์ถํฉ๋๋ค. ์ ํจ๋ฒ์๋ฅผ ์ง์ ํ์ง ์๊ณ test()๋ฅผ ํธ์ถํ๊ฒ ๋๋ฉด Global์ ์ ์ธ๋ test ํจ์๋ฅผ ํธ์ถํฉ๋๋ค.
this.Button00_onclick = function(obj:nexacro.Button, e:nexacro.ClickEventInfo)
{
test();
this.test();
}
์๋์ ๊ฐ์ด ์ ํจ๋ฒ์ ์์ด ์ง์ ๋ ํจ์๋ Global๋ก ์ฒ๋ฆฌ๋ฉ๋๋ค.
Button00_onclick = function(obj:nexacro.Button, e:nexacro.ClickEventInfo)
{
...
}
function Button00_onclick(obj:nexacro.Button, e:nexacro.ClickEventInfo)
{
...
}
์ฃผ์:
transaction()๊ณผ ๊ฐ์ Application ๋๋ Form ๋ฉ์๋๋ ํด๋นํ๋ ์ ํจ๋ฒ์๋ฅผ ์ง์ ํด์ฃผ์ด์ผ ํฉ๋๋ค.
//application
nexacro.getApplication().exit("");
nexacro.getApplication().transaction("");
//Form
this.close("");
this.go("");
this.transaction("");
ํ:
Application ์ ์ฒด์์ ์ฌ์ฉํ๊ณ ์ถ์ ๋ณ์๋ Global ๋ณ์๊ฐ ์๋ AppVariables๋ก ๋ฑ๋กํด์ ์ฌ์ฉํ๋ ๊ฒ์ ๊ถ์ฅํฉ๋๋ค.
nexacro.getApplication().addVariable("aaa", "TEST");
trace(nexacro.getApplication().aaa); // TEST
### Expr
Grid ์ปดํฌ๋ํธ ๋ด์์ ์ฌ์ฉํ๋ expr ์คํฌ๋ฆฝํธ๋ ๋ฅ์ฌํฌ๋ก ๋ด๋ถ์ ์ผ๋ก ๋ฐ์ธ๋ฉ ๋ Dataset์ ๊ธฐ์ค์ผ๋ก ์ฒ๋ฆฌ๋๊ธฐ ๋๋ฌธ์ ๋ณ๋์ ์ ํจ๋ฒ์๋ฅผ ์ง์ ํ์ง ์์๋ ์ฌ์ฉํ ์ ์์ต๋๋ค. ๋ฐ์ธ๋ฉ ๋์ง ์์ Dataset์ ์ง์ ์ ๊ทผํ๋ ค๋ฉด ์ ํจ๋ฒ์๋ฅผ ์ง์ ํด์ฃผ์ด์ผ ํฉ๋๋ค.
์๋์ ๊ฐ์ด ๋ฐ์ธ๋ฉ ๋ Dataset์ ๋ํด expr๋ฅผ ์ฌ์ฉํ๋ ๊ฒฝ์ฐ์๋ this๋ฅผ ๋ถ์ด์ง ์์ต๋๋ค.
<Cell text="expr:Column00"/>
<Cell text="expr:Column00.min"/>
<Cell text="expr:currow"/>
<Cell text="expr:rowposition"/>
<Cell text="expr:getSumNF('col0')"/>
Dataset.set_filterstr("Column00=='test'");
Dataset.filter("Column00=='test'");
expr ์คํฌ๋ฆฝํธ ๋ด์์ ๋ฐ์ธ๋ฉ ๋ Grid ์ค๋ธ์ ํธ, Dataset ์ปดํฌ๋ํธ, Cell ์ค๋ธ์ ํธ๋ฅผ ์ง์ ํ๊ณ ์ ํ ๋๋ ์๋์ ๊ฐ์ ๋ณ์ ๋๋ ์ง์์๋ฅผ ์ฌ์ฉํฉ๋๋ค.
Grid: comp
Dataset: dataset
Cell: this
<Cell text="expr:this.col"/> <!-- Cell -->
<Cell text="expr:dataset.rowcount"/> <!-- Binded Dataset -->
<Cell text="expr:comp.currentcell"/> <!-- Grid -->
<Cell text="expr:dataset.parent.func1()"/> <!-- Form -->
<Cell text="expr:comp.parent.func1()"/> <!-- Form -->
๋
ธํธ:
Form์ ๋ํ ์ง์์๋ฅผ ๋ณ๋๋ก ์ ๊ณตํ์ง ์์ผ๋ฉฐ ํ์ํ๋ฉด comp.parent ๋๋ dataset.parent ์ ๊ฐ์ด ์ ๊ทผํฉ๋๋ค.
์ฃผ์:
Form ๋ด์ ์๋ ํจ์์ ์ ๊ทผํ ๋ comp.parent.func() ํ์์ ์ฌ์ฉํ์ง ์๊ณ this๋ฅผ ์ฌ์ฉํ๊ฒ ๋๋ฉด ์ค๋ฅ๋ก ์ฒ๋ฆฌ๋ฉ๋๋ค. expr ์คํฌ๋ฆฝํธ์์ this๋ Cell ์ค๋ธ์ ํธ๋ฅผ ๊ฐ๋ฆฌํต๋๋ค.
<Cell text="expr:this.func01()"/>
์ปดํฌ๋ํธ ์์ฑ์ผ๋ก Expr๊ณผ Text๊ฐ ๊ฐ์ด ์๋ ๊ฒฝ์ฐ์ ํ๋ฉด์ ๋ณด์ด๋ ํ
์คํธ๋ฅผ ๋ฐํํ๋ getDisplayText ๋ฉ์๋๋ฅผ ์ฌ์ฉํ ์ ์์ต๋๋ค.
this.Button00.set_text("text");
this.Button00.set_expr("1+1");
trace(this.Button00.text); // "text"
trace(this.Button00.expr); // "1+1"
trace(this.Button00.getDisplayText()); // "2"
### lookup
lookup ๋ฉ์๋๋ ์ ํจ๋ฒ์๋ฅผ ์ง์ ํด ์ ๊ทผํ๊ธฐ ์ด๋ ค์ด ๊ฒฝ์ฐ ์ฌ์ฉํ ์ ์๋๋ก ์ค๊ณ๋ ์ถ๊ฐ ๋ฉ์๋์
๋๋ค. ์ํ๋ ์ค๋ธ์ ํธ๋ ํจ์๋ฅผ id ๋๋ ํจ์๋ช
์ ๊ฐ์ง๊ณ ์ฐพ์ ์ ์์ต๋๋ค.
lookup ๋ฉ์๋๋ ์๋์ ๊ฐ์ ํ์์ผ๋ก ์ฌ์ฉํ ์ ์์ต๋๋ค.
Form.lookup( strid );
nexacro.getApplication().lookup( strid );
[Component].addEventHandlerLookup( eventid, funcid, target );
์ค์ ์ฝ๋์์๋ ์๋์ ๊ฐ์ด ์ฌ์ฉ๋ฉ๋๋ค.
// this์์ ์์๋ก ๊ฒ์ํด์ objectid์ ํด๋นํ๋ ์ค๋ธ์ ํธ๋ฅผ ๋ฐํ
var obj = this.lookup("objectid");
// this์์ ์์๋ก ๊ฒ์ํด์ fn_onclick์ ํด๋นํ๋ ํจ์๋ฅผ ๋ฐํ
this.lookup("fn_onclick")();
// this์์ ์์๋ก ๊ฒ์ํด์ fn_onclick์ ํด๋นํ๋ ํจ์๋ฅผ ์ด๋ฒคํธ ํธ๋ค๋ฌ์์ ์ฒ๋ฆฌ
btn00.addEventHandlerLookup( "onclick", "fn_onclick", this );
## ์ด๋ฒคํธ ํธ๋ค๋ฌ
์ด๋ฒคํธ ์ฒ๋ฆฌ๋ฅผ ์ํ ์ด๋ฒคํธ ํธ๋ค๋ฌ๋ ๋ฅ์ฌํฌ๋ก ์คํ๋์ค ์์ฑ์ฐฝ์์ ์ถ๊ฐํ๊ฑฐ๋ ๊ฐ ์ปดํฌ๋ํธ, ์ค๋ธ์ ํธ์ ์ ๊ณตํ๋ ๋ฉ์๋๋ฅผ ์ฌ์ฉํด ์คํฌ๋ฆฝํธ์์ ์ถ๊ฐํ ์ ์์ต๋๋ค.
### ๋ฉ์๋
์คํฌ๋ฆฝํธ ๋ด์์ ์ด๋ฒคํธ ์ฒ๋ฆฌ๋ฅผ ์ํด ์ด๋ฒคํธ ํจ์๋ฅผ ์ถ๊ฐ, ์ค์ ํ๊ฑฐ๋ ์ญ์ ํ ์ ์๋ ๋ฉ์๋๋ฅผ ์ ๊ณตํฉ๋๋ค.
addEventHandler( eventid, funcobj, target )
addEventHandlerLookup( eventid, funcstr, target )
setEventHandler( eventid, funcobj, target )
setEventHandlerLookup( eventid, functstr, target )
removeEventHandler( eventid, funcobj, target )
removeEventHandlerLookup( eventid, funcstr, target )
์ด๋ฒคํธ๋ฅผ ์ฒ๋ฆฌํ ํจ์์ ์ ํจ๋ฒ์์ ๋ฐ๋ผ ์ ์ ํ ๋ฉ์๋๋ฅผ ์ ํํด ์ฌ์ฉํฉ๋๋ค.
this.btn00.setEventHandler("onclick", this.fn_onclick, this);
this.dataset00.addEventHandlerLookup("onrowposchange", "fn_onchange", this);
์ฃผ์:
addEventHandlerLookup, setEventHandlerLookup, removeEventHandlerLookup ๋ฉ์๋๋ ์ฑ ์ฑ๋ฅ์ ์ํฅ์ ๋ฏธ์น ์ ์์ผ๋ฏ๋ก ํ์ํ ๊ฒฝ์ฐ๋ง ์ฌ์ฉ์ ๊ถ์ฅํฉ๋๋ค.
๋
ธํธ:
์ด๋ฒคํธ๋ฅผ ์์ฑ ์ฐฝ์์ ์์ฑํ๊ฒ ๋๋ฉด ์๋์ ๊ฐ์ด ๋ฌธ์์ด๋ก ์ค์ ๋ฉ๋๋ค.
<Button id="Button00" ... onclick="Button00_onclick"/>
ํด๋น ์ฝ๋๋ ๋น๋ ์์
ํ ๋ณํ๋ ์๋ฐ์คํฌ๋ฆฝํธ ์ฝ๋์์๋ ์๋์ ๊ฐ์ด this ์ง์์๋ฅผ ๋ถ์ฌ์ ์์ฑ๋ฉ๋๋ค.
this.Button00.addEventHandler("onclick", this.Button00_onclick, this);
### ์ค๋ธ์ ํธ ํ์
๋ฅ์ฌํฌ๋ก ์คํ๋์ค์์ ์ด๋ฒคํธ ํธ๋ค๋ฌ ํจ์์ ๋งค๊ฐ๋ณ์๋ฅผ ์ค์ ํ ๋ ์ค๋ธ์ ํธ์ ํ์
์ ์ง์ ํ ์ ์์ต๋๋ค. ํ์
์ ์๋ฐ์คํฌ๋ฆฝํธ ํ์ค ๋ฌธ๋ฒ์ ์๋๋ฉฐ ๋ฅ์ฌํฌ๋ก ์คํ๋์ค ๋ด๋ถ์์ ๊ฐ๋ฐ ํธ์์ฑ์ ์ ๊ณตํ๊ธฐ ์ํด ์ง์๋๋ ํ์์
๋๋ค.
this.Button00_onclick = function(obj:nexacro.Button,e:nexacro.ClickEventInfo)
{
trace(obj.text);
}
์
๋ ฅ๋ ํ์
๊ฐ์ ๊ธฐ์ค์ผ๋ก ๋ฅ์ฌํฌ๋ก ์คํ๋์ค์์ ์ธํ
๋ฆฌ์ผ์ค ๊ธฐ๋ฅ์ ์ง์ํฉ๋๋ค.
ํด๋น ์ฝ๋๋ฅผ ์๋ฐ์คํฌ๋ฆฝํธ ์ฝ๋๋ก ๋ณํํ ๋๋ ํ์
๊ฐ์ ์ ๊ฑฐํฉ๋๋ค.
this.Button00_onclick = function(obj, e)
{
trace(obj.text);
}
ํ:
์ค๋ธ์ ํธ ํ์
์ ์ง์ ํ์ง ์์๋ ์ฑ์ด ์คํํ๋๋ฐ ์ํฅ์ ๋ฏธ์น์ง ์์ต๋๋ค.
์ฃผ์:
์ด๋ฒคํธ ํธ๋ค๋ฌ ํจ์ ์ธ ๋ค๋ฅธ ํจ์์์๋ ์ค๋ธ์ ํธ ํ์
์ ์ง์ํ์ง ์์ผ๋ฉฐ ๋์์ ์ํฅ์ ๋ฏธ์น ์ ์์ต๋๋ค.
## Setter
ECMAScript 5๋ถํฐ ์ง์ํ๋ Setter/Getter์ ๋ณ๊ฐ๋ก ๋ฅ์ฌํฌ๋ก์์ set ๋ฉ์๋๋ฅผ ์ ๊ณตํฉ๋๋ค.
### set ๋ฉ์๋
์๋ฅผ ๋ค์ด Button ์ปดํฌ๋ํธ์ text ์์ฑ์ ์ฌ์ฉํ ๋๋ ์๋์ ๊ฐ์ด ์ฌ์ฉํ ์ ์์ต๋๋ค.
this.Button00.set_text("text");
trace(this.Button00.text);
์ฃผ์:
์๋์ ๊ฐ์ด ์์ฑ๊ฐ์ ์ง์ ์ ๊ทผํ๋ ๋ฐฉ์์ ๋๋ ์ง์ํ์ง ์์ต๋๋ค.
this.Button00.text = "text";
๋
ธํธ:
์ฌ์ฉ์๊ฐ ์ง์ ์ถ๊ฐํ ์ค๋ธ์ ํธ ์์ฑ์ ์ ๊ทผํ ๋๋ ๊ธฐ์กด์ฒ๋ผ ์ ๊ทผํ ์ ์์ต๋๋ค.
<Button myprop="333">
this.Button00.myprop = "333";
this.Button00.mytext = "text";
์คํ์ผ ๊ด๋ จ ์์ฑ์ ์ ๊ทผํ๋ ๋ฐฉ์๋ set ๋ฉ์๋๋ฅผ ์ฌ์ฉํฉ๋๋ค. ์ถ๊ฐ๋ set ๋ฉ์๋์๋ ํ์ ์์ฑ๊น์ง ํฌํจํ๊ณ ์์ต๋๋ค. ๊ธฐ์กด ์์ฑ์ ๊ฐ์ ๊ฐ์ ธ์ฌ ๋๋ง ์ฌ์ฉํ ์ ์์ต๋๋ค.
this.Button00.set_color('aqua');
trace(this.Button00.color); // 'aqua'
์ฃผ์:
set ๋ฉ์๋๋ฅผ ํธ์ถํ๊ธฐ ์ ์ ์คํ์ผ ์์ฑ๊ฐ์ ๊ฐ์ ธ์ค๋ ค ํ๋ฉด null ๊ฐ์ด ๋์ฌ ์ ์์ต๋๋ค.
### ๋์ ์ธ ์์ฑ
์์ฑ๊ฐ์ ๊ฐ์ ธ์ค๋ ๊ฒ์ ๊ธฐ์กด๊ณผ ๊ฐ์ง๋ง, ์์ธ์ ์ผ๋ก ๋์ ์ผ๋ก ์์ฑ๊ฐ์ด ๋ณ๊ฒฝ๋๋ ์ค๋ธ์ ํธ๋ ๋ณ๋์ GetMethod๋ฅผ ์ ๊ณตํฉ๋๋ค. System ์ค๋ธ์ ํธ์ curx, cury, screenwidth, screenheight 4๊ฐ ์์ฑ์ ์ถ๊ฐ๋ ๋ฉ์๋๋ฅผ ์ฌ์ฉํด์ผ ํฉ๋๋ค.
nexacro.System.getCursorX();
nexacro.System.getCursorY();
nexacro.System.getScreenWidth();
nexacro.System.getScreenHeight();
์ปดํฌ๋ํธ ํ์
์ ๋ฐ๋ผ ์ฌ์ฉํ์ง ์๋ ์์ฑ์ ์ ๊ทผํ ์ ์์ต๋๋ค. ์๋ฅผ ๋ค์ด Calendar ์ปดํฌ๋ํธ์ ํ์
์ด spin์ด ์๋ ๊ฒฝ์ฐ์๋ ์๋ ์์ฑ์ ์ ๊ทผํ ์ ์์ต๋๋ค.
this.Calendar.spindownbutton
this.Calendar.spinupbutton
๋
ธํธ:
Calendar ์ปดํฌ๋ํธ์์ spindownbutton ์์ฑ์ ์ปจํธ๋กค ์์ฑ(Control Property)์ด๋ผ๊ณ ํ๋ฉฐ ์์ฑ ์์ฒด๋ฅผ ๋ฌธ์์ด๋ก ์ถ๋ ฅํ๋ฉด [object ButtonControl]๋ผ๊ณ ํ์๋ฉ๋๋ค.
## ๊ธฐํ ๋ณ๊ฒฝ ์ฌํญ
### nexacro ๋ฉ์๋
ECMAScript์์ ์ง์ํ์ง ์๋ ๊ธฐ๋ฅ์ ๋ฅ์ฌํฌ๋ก ์์ฒด์ ์ผ๋ก ์์ ํด ์ฌ์ฉํ๋ ๋ฉ์๋๋ ์ง์ํ์ง ์์ต๋๋ค. ๊ธฐ์กด์ ์ ๊ณตํ๋ ๊ธฐ๋ฅ์ nexacro ๋ฉ์๋๋ก ๋ณ๋ ์ ๊ณตํฉ๋๋ค.
์๋ฅผ ๋ค์ด Math ์ค๋ธ์ ํธ์์ ์ ๊ณตํ๋ ๋ฉ์๋ ์ค 2๊ฐ์ ์ธ์๋ฅผ ์ง์ํ๋ floor, ceil, round ๋ฉ์๋๋ ๋๋ ์ ๊ณต๋์ง ์์ต๋๋ค. ํด๋น ๋ฉ์๋๋ฅผ ์ฌ์ฉํ๋ ค๋ฉด nexacro ๋ฉ์๋๋ก ์ฌ์ฉํด์ผ ํฉ๋๋ค.
//Math.floor( v, digit );
nexacro.floor( v, digit );
//Math.ceil( v, digit );
nexacro.ceil( v, digit );
//Math.round( v, digit );
nexacro.round( v, digit );
๋ํ, ์๋ฐ์คํฌ๋ฆฝํธ์์ ์์ฝ์ด๋ก ์ฌ์ฉํ๋ ์ผ๋ถ ์ค๋ธ์ ํธ์ ๋ช
์นญ์ด ๋ณ๊ฒฝ๋์์ต๋๋ค.
//new Image();
new nexacro.Image();
์์ฝ์ด์ ์ค๋ณต๋์ง ์๋ ๋๋จธ์ง ์ปดํฌ๋ํธ๋ TypeDefinition ๋ด์ classname์ด nexacro.Button๊ณผ ๊ฐ์ ํ์์ผ๋ก ๋ณ๊ฒฝ๋์์ต๋๋ค. ํ์ง๋ง ๊ธฐ์กด์ฒ๋ผ Button์ ๊ทธ๋๋ก ์ฌ์ฉํ ์ ์์ต๋๋ค.
this.button00 = new Button();
or
this.button00 = new nexacro.Button();
๋
ธํธ:
์์ฑ์ด๋ ์ค๋ธ์ ํธ๋ ์์ฝ์ด์ ์ถฉ๋๋์ด ์ผ๋ถ ๋ณ๊ฒฝ๋์์ต๋๋ค.
Component.class โ Component.cssclass
ExcelExportObject.export() โ ExcelExportObject.exportData()
VirtualFile.delete() โ VirtualFile.remove()
### ๋์ ๋ฐฉ์ ๋ณ๊ฒฝ
์๋ฐ์คํฌ๋ฆฝํธ์์ ์ง์ํ์ง ์๊ฑฐ๋ ๋ค๋ฅด๊ฒ ๋์ํ๋ ์ผ๋ถ ํญ๋ชฉ์ด ์์ ๋์์ต๋๋ค.
<> ๋น๊ต ์ฐ์ฐ์ ์ง์ํ์ง ์์
<> ๋น๊ต ์ฐ์ฐ์๋ฅผ ๋๋ ์ง์ํ์ง ์์ต๋๋ค. ๋ค๋ฅธ ๊ฐ์ ๋น๊ตํ ๋๋ != ์ฐ์ฐ์๋ฅผ ์ฌ์ฉํ์ธ์.
switch ๋ฌธ ๋ด ๋ฌธ์์ด ์ฒ๋ฆฌ ๋ฐฉ์ ๋ณ๊ฒฝ
์ด์ ๋ฒ์ ์์๋ switch ๋ฌธ ๋ด์์ case "2" ์ case 2 ๊ฐ ๊ฐ์ ๋ฐฉ์์ผ๋ก ์ฒ๋ฆฌ๋๋ ๊ฒ์ ๋ณ๊ฐ์ ๊ฐ์ผ๋ก ์ฒ๋ฆฌํฉ๋๋ค.
์ ๊ทํํ์ /g ์ต์
์ ์ฉ ๋ฐฉ์ ๋ณ๊ฒฝ
์ ๊ทํํ์์์ /g ์ต์
์ ์ฌ์ฉํ์ง ์๊ณ replace๋ฅผ ์ ์ฉํ๊ฒ ๋๋ฉด ํ ๊ฐ์ ํญ๋ชฉ๋ง ๋ณ๊ฒฝ๋๋ฉฐ /g ์ต์
์ ์ ์ฉํด์ผ ์ ์ฒด ํญ๋ชฉ์ด ๋ณ๊ฒฝ๋ฉ๋๋ค.
### ์ค๋ธ์ ํธ ๋ช
์์ฑ ์ ์ ์ฝ
์ปจํ
์ด๋์ ๋ฉค๋ฒ์ธ ์์ฑ, ๋ฉ์๋๋ช
๊ณผ ๊ฐ์ ChildName์ ๋ง๋ค ์ ์์ต๋๋ค. ์๋ฅผ ๋ค์ด Form์ text๋ผ๋ ์์ฑ์ด ์๋๋ฐ ์ถ๊ฐ๋ ๋ฒํผ ์ปดํฌ๋ํธ์ id๋ฅผ text๋ก ์ง์ ํ ์ ์์ต๋๋ค. ์๋ ๊ฐ์ ๊ฒฝ์ฐ ๋ฒํผ์ด ์์ฑ๋์ง ์์ต๋๋ค.
<Form text="formtext">
<Layouts>
<Layout>
<Button id="text'>
Dataset๊ณผ ๊ฐ์ Invisible ์ค๋ธ์ ํธ ์ญ์ Array์ ๋ฉค๋ฒ๋ก ์ฒ๋ฆฌ๋์ด length์ ๊ฐ์ ์์ฑ์ id๋ก ์ง์ ํ ์ ์์ต๋๋ค. ์๋ ๊ฐ์ ๊ฒฝ์ฐ ์ปฌ๋ผ์ด ์์ฑ๋์ง ์์ต๋๋ค.
<Objects>
<Dataset id="Dataset00">
<ColumnInfo>
<Column id="length" type="STRING" size="256"/>
</ColumnInfo>
### ๋ณ์๋ช
, ํจ์๋ช
์์ฑ ์ ์ ์ฝ
์ฃผ์:
๋ณ์๋ช
์ด๋ ํจ์๋ช
์์ ์ธ๋๋ฐ(_)๋ฅผ ํฌํจํ๋ ๊ฒฝ์ฐ ๋ฅ์ฌํฌ๋ก ๋ผ์ด๋ธ๋ฌ๋ฆฌ์์ ์ฌ์ฉํ๋ ๋ณ์๋ ํจ์์ ์ถฉ๋ํ ์ ์์ต๋๋ค. ์ด๋ก ์ธํด ํ๋ฉด์ด ๋ณด์ด์ง ์๊ฑฐ๋ ์๋์ ๋ค๋ฅธ ๋ฐฉํฅ์ผ๋ก ์ฑ์ด ๋์ํ ์ ์์ต๋๋ค.
์๋ฅผ ๋ค์ด ์๋์ ๊ฒฝ์ฐ ๋ก๋ฉ์ด ์๋ฃ๋์ง ์๊ณ ํ๋ฉด์ด ๋ณด์ด์ง ์์ต๋๋ค. ๋ฅ์ฌํฌ๋ก ๋ผ์ด๋ธ๋ฌ๋ฆฌ์์ ์ฌ์ฉํ๋ _is_loading ๋ณ์์ ๊ฐ์ ์ด๋ฆ์ผ๋ก ๋ณ์๋ช
์ ๋ง๋ค์์ต๋๋ค.
this._is_loading = true;
this.Button00_onclick = function(obj:Button, e:nexacro.ClickEventInfo)
{
trace(this._is_loading);
}
์ฃผ์:
์ธ๋๋ฐ(_)๋ฅผ ํฌํจํ์ง ์๋๋ผ๋ ๋ฅ์ฌํฌ๋ก ๋ผ์ด๋ธ๋ฌ๋ฆฌ์์ ์ฌ์ฉํ๋ ์ผ๋ถ ๋ณ์๋ช
์ด๋ ํจ์๋ช
๊ณผ ์ถฉ๋ํ ์ ์์ต๋๋ค.
์๋ฅผ ๋ค์ด ์๋์ ๊ฒฝ์ฐ ์ปดํฌ๋ํธ ์์ฑ์ด ์๋ฃ๋์ง ์๊ณ ํ๋ฉด์ด ๋ณด์ด์ง ์์ต๋๋ค. ๋ฅ์ฌํฌ๋ก ๋ผ์ด๋ธ๋ฌ๋ฆฌ์์ ์ฌ์ฉํ๋ createComponent ํจ์์ ๊ฐ์ ์ด๋ฆ์ผ๋ก ํจ์๋ช
์ ๋ง๋ค์์ต๋๋ค.
this.createComponent = function()
{
trace('createComponent ');
}
### ์ถ๊ฐ ๋ชจ๋์์ window ์ค๋ธ์ ํธ ์ฌ์ฉ ์ ์ ์ฝ
์ฃผ์:
์ธ๋ถ ๋ผ์ด๋ธ๋ฌ๋ฆฌ ๋๋ ์๋ฐ์คํฌ๋ฆฝํธ ํ์ผ์ ๋ชจ๋๋ก ๋ฑ๋กํด ์ฌ์ฉํ๋ ๊ฒฝ์ฐ window ์ค๋ธ์ ํธ๊ฐ ํฌํจ๋ ์ฝ๋๋ ํ๋ก์ ํธ ๋ก๋ฉ ์ ๋ฅ์ฌํฌ๋ก ์คํ๋์ค์์ ์๋ฌ๊ฐ ๋ฐ์ํ ์ ์์ต๋๋ค.
๋ฅ์ฌํฌ๋ก ์คํ๋์ค์์๋ ํ๋ก์ ํธ๋ฅผ ๋ก๋ฉํ๋ฉด์ ๋ชจ๋๋ก ๋ฑ๋ก๋ ์ฝ๋๋ฅผ ๋ถ์ํ๊ณ ์ฒ๋ฆฌํ๋๋ฐ ์ด ๊ณผ์ ์์ NRE์์ ์ง์ํ์ง ์๋ window ์ค๋ธ์ ํธ๋ฅผ ์ฒ๋ฆฌํ๋ฉด์ ์๋ฌ๊ฐ ๋ฐ์ํฉ๋๋ค. window ์ค๋ธ์ ํธ๋ฅผ ์ฒ๋ฆฌํ์ง ์๋๋ก ์๋์ ๊ฐ์ด ์ฝ๋ ์๋จ์ ๋ถ๊ธฐ์ฒ๋ฆฌ๋ฌธ๋ฅผ ์ถ๊ฐํ๋ฉด ์๋ฌ๊ฐ ๋ฐ์ํ์ง ์์ต๋๋ค.
if( system.navigatorname != "nexacro DesignMode")
{
if (typeof JSON !== 'object') {
JSON = {};
}
(function () {
...
}) (window)
};
<|eot_id|>
|
<|begin_of_text|>๋ฅ์ฌํฌ๋ก ๊ฐ์ด๋ ๋ถ(์์ฉ๊ฐ๋ฐ ๊ฐ์ด๋) title: Frame Tree contents: ๋ฅ์ฌํฌ๋ก๋ ํ๋์ Form๋ง ๊ฐ์ง๋ ๊ฐ๋จํ ๊ตฌ์กฐ๋ก ํ๋ฉด์ ๊ตฌ์ฑํ ์ ์๊ณ ์ฌ๋ฌ ๊ธฐ๋ฅ์ ๋ณตํฉ์ ์ผ๋ก ์ํํ๋ ํํ์ ๊ตฌ์กฐ๋ก ๊ตฌ์ฑํ ์๋ ์์ต๋๋ค. ์ด๋ฐ ๋ณต์กํ ๊ตฌ์กฐ์์๋ ๊ฐ ํ๋ฉด์ ๊ตฌ์ฑํ๋ ์์๊ฐ ์๋ก ์ด๋ป๊ฒ ์ฐ๊ฒฐ๋๋์ง ์ดํดํ๋ ๊ฒ์ด ํ์ํฉ๋๋ค.
์ด๋ฒ ์ฅ์์๋ ์ด๋ฐ ์ฐ๊ฒฐ ๊ตฌ์กฐ์ ๋ํ ๊ฐ๋
์ ๋ช ๊ฐ์ง ์์ ๋ฅผ ํตํด ์ดํด๋ด
๋๋ค.
## Application
// application -> mainframe
this.mainframe
this.id
this.all[n]
this.all['id']
// mainframe -> application
this.mainframe.parent
// mainframe -> childframe
this.mainframe.frame
this.mainframe.all[n]
this.mainframe.all['id']
this.mainframe.id
// childframe -> mainframe
this.mainframe.frame.parent
this.mainframe.frame.getOwnerFrame()
// childframe -> form
this.mainframe.frame.form
// form -> childframe
this.parent
this.getOwnerFrame()
nexacro.getApplication().mainframe.frame
๋
ธํธ:
form๋ด์ component / bind / invisible object๋ .getOwnerFrame()์ด๋ .getOwnerForm()์ด ์์ต๋๋ค.
### Script ์์ ํ๋ฉด
### application์์ form ์ค๋ธ์ ํธ ์ ๊ทผ
// frm0๋ก์ ์ ๊ทผ
this.mainframe.frame.form.name =="frm0"
this.mframe0.frame.form.name == "frm0"
this.mframe0.chdframe0.form.name == "frm0"
this.all[0].all[0].form.name == "frm0"
this.all["mframe0"].all["chdframe0"].form.name == "frm0"
this.mainframe.frame.form.name == "frm0"
### form์์ ์์ ์ค๋ธ์ ํธ ์ ๊ทผ
// frm0์์ application์ผ๋ก ์ ๊ทผ
this.parent.name == "chdframe0"
this.parent.parent.name == "mframe0"
this.getOwnerFrame().getOwnerFrame().name == "mframe0"
nexacro.getApplication().mainframe.name == "mframe0"
## Form
ํ๋์ Form๊ณผ Object, Bind, Component์ ๊ด๊ณ๋ 1:N ๊ตฌ์กฐ์
๋๋ค. ์คํฌ๋ฆฝํธ ์ฝ๋์์์๋ ์๋์ ๊ฐ์ ํ์์ผ๋ก ์ ๊ทผํ ์ ์์ต๋๋ค.
// Form -> Object
this.all[n]
this.all['id']
this.id
this.objects[n]
this.objects['id']
// Form -> Bind
this.all[n]
this.all['id']
this.id
this.binds[n]
this.binds['id']
// Form -> Component
this.all[n]
this.all['id']
this.id
this.components[n]
this.components['id']
// Object, Bind, Component -> Bind
this.all[n].parent
Div, PopupDiv, Tabpage์ ๊ฐ์ ์ปจํ
์ด๋ ์ปดํฌ๋ํธ๋ url ์์ฑ์ ์ง์ ํด Form์ ์ฐ๊ฒฐํ ์ ์์ต๋๋ค. ์ด๋ฐ ๊ฒฝ์ฐ ์ปจํ
์ด๋ ์ปดํฌ๋ํธ์ Form์ 1:1 ๊ตฌ์กฐ์
๋๋ค. ์คํฌ๋ฆฝํธ ์์์ Form์ ์ฐ๊ฒฐ๋ Object, Bind, Component๋ ์๋์ ๊ฐ์ ํ์์ผ๋ก ์ ๊ทผํ ์ ์์ต๋๋ค.
// Container Component -> Object
this.Div.form.all[n]
this.Div.form.all['id']
this.Div.form.id
this.Div.form.objects[n]
this.Div.form.objects['id']
// Container Component -> Bind
this.Div.form.all[n]
this.Div.form.all['id']
this.Div.form.id
this.Div.form.binds[n]
this.Div.form.binds['id']
// Container Component -> Component
this.Div.form.all[n]
this.Div.form.all['id']
this.Div.form.id
this.Div.form.components[n]
this.Div.form.components['id']
// Object, Bind, Component -> Container Component
this.Div.form.all[n].parent.parent
all, objects, binds, components ์์ฑ์ nexacro.Collection ํ์์ผ๋ก ์ ๊ณต๋ฉ๋๋ค. ์ปฌ๋ ์
์ค๋ธ์ ํธ ๋ด ์ธ๋ฑ์ค ๋๋ id๋ก ์ ๊ทผํ ์ ์์ต๋๋ค.
๋
ธํธ:
all ์์ฑ์ผ๋ก ์ ๊ทผํ๋ ์ปฌ๋ ์
์ค๋ธ์ ํธ ๋ด ์ธ๋ฑ์ค๋ ๋ค์๊ณผ ๊ฐ์ ์์๋ก ์ง์ ๋ฉ๋๋ค.
1. Object
2. Component
3. Bind
๊ทธ๋ฆฌ๊ณ ๊ฐ์ ํญ๋ชฉ ๋ด์์๋ ์์ค ์ฝ๋ ๋ด ์์์ ๋ฐ๋ผ ์ง์ ๋ฉ๋๋ค.
### Script ์์ ํ๋ฉด
๋
ธํธ:
์ธ๋ฑ์ค ์์๋ dtset1, btn0, btn1, cmb0, div0, div1, bind1์ผ๋ก ๊ฐ์ ํฉ๋๋ค.
์ผ๋ฐ์ ์ธ ํผ์์ ์ธ๋ฑ์ค ์์๋ Dataset์ด ๊ฐ์ฅ ๋จผ์ ์ค๊ณ ๋๋จธ์ง ์ปดํฌ๋ํธ๋ ๋ฐฐ์น๋ ์์๋๋ก ์ ํด์ง๋ฉฐ Bind ์ค๋ธ์ ํธ๊ฐ ๋ง์ง๋ง์ ์ง์ ๋ฉ๋๋ค.
ํ:
ํ form์์ ๊ฐ์ level์์๋ง id๊ฐ ์ค๋ณต๋ ์ ์์ต๋๋ค. ์ฆ, btn0์ div0_btn0์ div2_btn์ ๋์ผ Level์ด ์๋๋ฏ๋ก, ๊ฐ์ id๋ก ์ง์ ํ์ฌ๋ ๋ฌด๋ฐฉํฉ๋๋ค.
### component / object / bind
this.name == "frm0"
// btn0์ผ๋ก์ ์ ๊ทผ
this.all["btn0"].name == "btn0"
this.all[1].name == "btn0"
this.btn0.name == "btn0"
this.components[0].name == "btn0"
this.components["btn0"].name == "btn0"
// dtset1์ผ๋ก์ ์ ๊ทผ
this.all["dtset1"].name == "dtset1"
this.all[0].name == "dtset1"
this.dtset1.name == "dtset1"
this.objects[0].name == "dtset1"
this.objects["dtset1"].name == "dtset1"
// component / invisible object / bind์ ๊ฐ์
this.all.length == 7
this.components.length == 5 //btn0, btn1, comb0, div0, div1
this.binds.length == 1
### container component
form์ ์ฐ๊ฒฐํ์ง ์์ container component๋ ๋์ ์ผ๋ก invisible object / bind๋ฅผ ๊ฐ์ง ์ ์์ต๋๋ค.
// div0๋ด์ div0_btn0์ผ๋ก์ ์ ๊ทผ
this.div0.form.div0_btn0.name == "div0_btn0"
this.div0.form.all[0].name == "div0_btn0"
this.components[3].form.components[0].name == "div0_btn0"
// div2๋ด์ div2_btn0์ผ๋ก์ ์ ๊ทผ
this.div0.form.div2.form.div2_btn0.name == "div2_btn0"
this.all["div0"].form.all["div2"].form.all["div2_btn0"].name == "div2_btn0"
this.components["div0"].form.components["div2"].form.components["div2_btn0"].name == "div2_btn0"
### form์ ์ฐ๊ฒฐํ container component
// (frm1์์ script์ธ ๊ฒฝ์ฐ) frm1์ ์๋ btn0์ ์ ๊ทผ
this.parent.name == "div1"
this.btn0.name == "btn0"
this.all["btn0"].name == "btn0"
// (frm0์์ script์์ ์ ๊ทผํ ๊ฒฝ์ฐ) frm1์ ์๋ btn0์ ์ ๊ทผ
this.name == "frm0"
this.div1.form.btn0.name == "btn0"
### parent
this.div1.form.dtset2.parent.parent.name == "form" // frm0์ด ์๋๋๋ค.
this.div1.form.dtset2.parent.name == "div1"
์ฐธ๊ณ
<|eot_id|>
|
<|begin_of_text|>๋ฅ์ฌํฌ๋ก ๊ฐ์ด๋ ๋ถ(์์ฉ๊ฐ๋ฐ ๊ฐ์ด๋) title: ์ฑ ์บ์ contents: ๋คํธ์ํฌ๋ฅผ ํจ์จ์ ์ผ๋ก ์ฌ์ฉํ๊ธฐ ์ํด ๊ฐ๋ฐ๋ ์ฑ์ ๋ฐฐํฌ์๋ฒ์์ ๋งค๋ฒ ๋ด๋ ค๋ฐ์ง ์๊ณ ์บ์ ๊ธฐ์ ์ ์ฌ์ฉํฉ๋๋ค.
## ์บ์์ ์ข
๋ฅ
์ง์ํ๋ ์บ์์ ์ข
๋ฅ๋ ์๋์ ๊ฐ์ต๋๋ค.
[Table]
| ์บ์ ์ํ | ์ค๋ช
|
|:------------|:--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| none | ์บ์ ๊ธฐ๋ฅ์ ์ฌ์ฉํ์ง ์์ต๋๋ค. |
| dynamic | ์๋ฒ๋ก๋ถํฐ ๋ด๋ ค๋ฐ์ ํ์ผ์ด ๊ฐฑ์ ๋์์ ๋๋ง ์์ ํฉ๋๋ค. |
| | ์๋ฒ์์ ํ์ผ์ด ๊ฐฑ์ ๋์ง ์์ ๊ฒฝ์ฐ๋ ๋ก์ปฌ ์บ์\(Local Cache\) ํ์ผ์ ์ฌ์ฌ์ฉํฉ๋๋ค. |
| session | ์์ง์ ๊ธฐ๋ํ ๋, ๋จ ํ ๋ฒ๋ง ์์ ํ๊ณ ํด๋น ์์ง์ด ์ข
๋ฃ๋ ๋๊น์ง ๋ก์ปฌ ์บ์ ํ์ผ๋ง์ ์ฌ์ฉํฉ๋๋ค. \(์์ง ๊ธฐ๋ ์ ๋ก์ปฌ ์บ์ ํ์ผ๊ณผ ์ผ์นํ๋ฉด ์ฌ์ฌ์ฉํฉ๋๋ค.\) |
| static | ์๋ฒ๋ก๋ถํฐ ํ ๋ฒ์ด๋ผ๋ ๋ด๋ ค๋ฐ์ ํ์ผ์ ์์ง ์ฌ์คํ๊ณผ ์๊ด์์ด ๋ก์ปฌ ์บ์ ํ์ผ๋ง ์ฌ์ฉํฉ๋๋ค. \(๋จ, Type Definition์ ์ง์ ๋ ์๋น์ค ๊ทธ๋ฃน์ ๋ฒ์ ์ด ๋ณ๊ฒฝ๋ ๊ฒฝ์ฐ์๋ ๋ค์ ๋ด๋ ค๋ฐ์ต๋๋ค.\) |
๋
ธํธ:
์์ฑ๊ฐ์ด static์ด๋ฉด ์บ์ ํ์ผ์ ๋ก์ปฌ์ ์ฅ์์ ์ ์ฅํ๊ฒ ๋๋๋ฐ ์น๋ธ๋ผ์ฐ์ ธ์ ๊ธฐ๋ฅ ์ ์ฝ์ผ๋ก ๋ก์ปฌ์ ์ฅ์๋ฅผ ์ฌ์ฉํ์ง ๋ชปํฉ๋๋ค. ๊ทธ๋์ ์น๋ธ๋ผ์ฐ์ ์์ ์ฌ์ฉํ๋ ๊ฒฝ์ฐ์๋ ์์ฑ๊ฐ์ด static์ธ ๊ฒฝ์ฐ์๋ session์ผ๋ก ๋์ํฉ๋๋ค.
ํ:
์น๋ธ๋ผ์ฐ์ ์์ ์ฌ์ฉํ๋ ๊ฒฝ์ฐ์๋ ์์ฑ๊ฐ์ด none์ด๋ฉด ๋ธ๋ผ์ฐ์ ์์ ์บ์๋ฅผ ์ฌ์ฉํ์ง ์๋ ๊ฒ์ด ์ ์์
๋๋ค. Firefox๋ฅผ ์ฌ์ฉํ๋ ๊ฒฝ์ฐ์๋ ๋ธ๋ผ์ฐ์ ์บ์๋ฅผ ์ฌ์ฉํ๋ ์ฆ์์ด ์๋๋ฐ ์ด ์ฆ์์ Firefox ๋ฒ๊ทธ์
๋๋ค.
https://bugzilla.mozilla.org/show_bug.cgi?id=1129500
ํ:
MS ์ธํฐ๋ท ์ต์คํ๋ก๋ฌ์์ ์คํ๋๋ ๊ฒฝ์ฐ ๋ฅ์ฌํฌ๋ก ๋ด๋ถ์์ ์ด์ฉํ๋ ์บ์๋ฉ๋ชจ๋ฆฌ๋ณด๋ค ์ธํฐ๋ท ์ต์คํ๋ก๋ฌ์ ์บ์๊ฐ ์ฐ์ ๋์ํ๋ ๊ฒฝ์ฐ๊ฐ ์์ต๋๋ค. ์น๋ธ๋ผ์ฐ์ ์บ์์ต์
์ด "์๋์ผ๋ก ํ์ธ(default)"์ผ ๋ ์๋ฒ์์ ๋ณ๊ฒฝ๋ ์๋ฐ์คํฌ๋ฆฝํธ ํ์ผ(*.js)์ด ๊ฐฑ์ ๋์ง ์๋ ํ์์ ์ ์ฝ์ฌํญ์
๋๋ค.
๋
ธํธ:
์น๋ธ๋ผ์ฐ์ ๋ฅผ ์๋ก ์คํํ๊ฑฐ๋ ์๋ก๊ณ ์นจํ๋ ๊ฒฝ์ฐ์๋ ์ ํ์์ ๊ด๋ฆฌํ๋ ๋ฉ๋ชจ๋ฆฌ์์ ์บ์๊ฐ ๋ชจ๋ ์ ๊ฑฐ๋๊ธฐ ๋๋ฌธ์ ์์ฑ๊ฐ์ session, dynamic, static์ผ๋ก ์ค์ ํ ๊ฒฝ์ฐ ์ค์ ํ ๊ฐ๊ณผ ๋ฌด๊ดํ๊ฒ ๋ธ๋ผ์ฐ์ ๋์์ ์์กดํ๊ฒ ๋ฉ๋๋ค.
๋
ธํธ:
๋ฅ์ฌํฌ๋ก ์คํ๋์ค์์ [Launch Project] ๋๋ [Quick View] ๋ฉ๋ด๋ฅผ ์ฌ์ฉํด NRE๋ฅผ ์คํํ๋ ๊ฒฝ์ฐ์๋ typedefinition์ ์ค์ ๋ Service-cachelevel ๊ฐ์ ๋ฌด์ํ๊ณ none์ผ๋ก ๋์ํฉ๋๋ค.
(cachelevel ์์ฑ์ ์ค์ ๊ฐ์ด ๋ณ๊ฒฝ๋๋ ๊ฒ์ ์๋๋๋ค)
๋
ธํธ:
๋ฅ์ฌํฌ๋ก์์ ์ด๋ฏธ์ง๋ฅผ ์ฒ๋ฆฌํ ๋๋ ์ด๋ฏธ์ง ํํ ๊ด๋ จ ๊ธฐ๋ฅ(size, stretch ๋ฑ)๊ณผ ์ฑ๋ฅ์์ ์ด์ ๋ก ์ฌ์ฉ ๋ธ๋ผ์ฐ์ ์ ์บ์ ์ค์ ์ ๋ฐ๋ฅธ ๋์์ ํ๋๋ก ์ค๊ณ๋์ต๋๋ค.
(ํ๋ก์ ํธ service ๊ทธ๋ฃน์ ์ค์ ๋ cachelevel๊ณผ๋ ๋ณ๊ฐ์ ๋์์
๋๋ค)
๋
ธํธ:
ExcelImportObject ๋๋ ExcelExportObject๋ฅผ ์ฌ์ฉํด ์์
ํ์ผ์ ๊ฐ์ ธ์ค๊ฑฐ๋ ๋ด๋ณด๋ผ ๋์๋ ์ง์ ํ cachelevel ์์ฑ๊ฐ๊ณผ ๊ด๊ณ์์ด ๋ฌด์กฐ๊ฑด none์ผ๋ก ๋์ํฉ๋๋ค.
## ์บ์ ์ ์ฉ ๋ฐฉ๋ฒ
๋ค์์ Type Definition ํธ์ง๊ธฐ์ ๋ํ ์ค๋ช
์
๋๋ค.
์บ์๋ ๋ฑ๋ก๋ ์๋น์ค ๊ทธ๋ฃน์๋ง ์ ์ฉ๋ฉ๋๋ค.
"./Base/' ํด๋ ์๋ ๋ฑ๋ก๋ ๋ชจ๋ ํ์ผ์ ๋ํด ์บ์๊ฐ ์ ์ฉ๋ฉ๋๋ค.
์บ์์ ์ข
๋ฅ๋ฅผ ์ ํํฉ๋๋ค.
์๋น์ค ๋ฒ์ ์ ์ค์ ํ๋ฉด Static ์ํ์์ ํ์ผ์ ๋ค์ ๋ด๋ ค๋ฐ์ ์ ์์ต๋๋ค.
nexacro.getEnvironment().services["Base"].set_cachelevel("none" )
<|eot_id|>
|
<|begin_of_text|>๋ฅ์ฌํฌ๋ก ๊ฐ์ด๋ ๋ถ(์์ฉ๊ฐ๋ฐ ๊ฐ์ด๋) title: Dataset XML Format contents: ๋ฅ์ฌํฌ๋ก๋ ์๋ฒ๋ชจ๋๋ก X-API๋ฅผ ์ ๊ณตํฉ๋๋ค. ์ด API๋ฅผ ์ฌ์ฉํ์ฌ ์์ฑ๋ Dataset format์ ๋ฅ์ฌํฌ๋ก๊ฐ ํด์ํด ์ฑ์ ํ๋ฉด์ ๋ณด์ฌ์ค๋๋ค.
์ฌ๊ธฐ์๋ X-API๊ฐ ์์ฑํ๋ Dataset format์ ์ค๋ช
ํฉ๋๋ค. ์ด format์ ์ค์ํ XML ํ์ผ์ ๋ฅ์ฌํฌ๋ก๊ฐ ๋ฐ๋ก ์ ์ฉํ ์ ์๋ ๋ฐ์ดํฐ๋ก ๊ฐ์ฃผํด ์ฌ์ฉํ ์ ์์ต๋๋ค. ์ฆ, X-API๋ฅผ ์ฌ์ฉํ์ง ์์๋ ์๋ฒ ํ๋ก๊ทธ๋จ์ ๊ฐ๋ฐํ ์ ์์ต๋๋ค.
## Dataset XML layout
[Table]
| XML Declaration | XML Declaration | XML Declaration | XML Declaration | XML Declaration | XML Declaration |
|:------------------|:------------------|:-------------------|:---------------------|:---------------------|:---------------------|
| Root | Root | Root | Root | Root | Root |
| | Cache | Cache | Cache | Cache | Cache |
| | Parameters | Parameters | Parameters | Parameters | Parameters |
| | | Parameter \(๋ฐ๋ณต\) | Parameter \(๋ฐ๋ณต\) | Parameter \(๋ฐ๋ณต\) | Parameter \(๋ฐ๋ณต\) |
| | Dataset \(๋ฐ๋ณต\) | Dataset \(๋ฐ๋ณต\) | Dataset \(๋ฐ๋ณต\) | Dataset \(๋ฐ๋ณต\) | Dataset \(๋ฐ๋ณต\) |
| | | ColumnInfo | ColumnInfo | ColumnInfo | ColumnInfo |
| | | | ConstColumn \(๋ฐ๋ณต\) | ConstColumn \(๋ฐ๋ณต\) | ConstColumn \(๋ฐ๋ณต\) |
| | | | Column \(๋ฐ๋ณต\) | Column \(๋ฐ๋ณต\) | Column \(๋ฐ๋ณต\) |
| | | Rows | Rows | Rows | Rows |
| | | | Row \(๋ฐ๋ณต\) | Row \(๋ฐ๋ณต\) | Row \(๋ฐ๋ณต\) |
| | | | | Col \(๋ฐ๋ณต\) | Col \(๋ฐ๋ณต\) |
| | | | | OrgRow | OrgRow |
| | | | | | Col \(๋ฐ๋ณต\) |
### XML ์ ์ธ
XML์์ ๋ช
์ํ๋ XML ์ ์ธ๋ฌธ์ ๋ค์๊ณผ ๊ฐ์ด ์ ์ํฉ๋๋ค.
<?xml version="1.0" encoding="utf-8"?>
XML ์ ์ธ๋ฌธ์ XML ๋ฌธ์์ ๊ฐ์ฅ ์์ ์์ด์ผ ํ๋ฉฐ, ์ด ์ ์ธ๋ฌธ ์์๋ ์ด๋ ํ ๊ณต๋ฐฑ๋ฌธ์๋ฅผ ํฌํจํ ์ด๋ ํ ๋ฌธ์๋ ์ฌ ์ ์์ต๋๋ค.
### XML ์
<?xml version="1.0" encoding="utf-8"?>
<Root xmlns="http://www.nexacroplatform.com/platform/dataset" ver="4000" >
<Parameters>
<Parameter id="service">stock</Parameter>
<Parameter id="method">search</Parameter>
</Parameters>
<Dataset id="output">
<ColumnInfo>
<ConstColumn id="market" size="10" type="STRING" value="kse"/>
<ConstColumn id="openprice" size="10" type="INT"
value="15000"/>
<Column id="stockCode" size="5" type="STRING"/>
<Column id="currentprice" size="10" type="INT"/>
</ColumnInfo>
<Rows>
<Row>
<Col id="currentCode">10001</Col>
<Col id="currentprice">5700</Col>
</Row>
<Row>
<Col id="currentCode">10002</Col>
<Col id="currentprice">14500</Col>
</Row>
</Rows>
</Dataset>
</Root>
## Dataset ์์
Dataset์ ๊ฐ ์์(element)๋ค์ ์ค๋ช
ํฉ๋๋ค.
### Root
๊ฐ์
Dataset์ ๋ํ๋ด๋ ์ต์์ ์์
์์ ์์
Parameters, Dataset
๋ฐ๋ณต ์ฌ๋ถ
๋ฐ๋์ 1๊ฐ๊ฐ ์์ด์ผ ํฉ๋๋ค.
์์ฑ
<Root xmlns="http://www.nexacroplatform.com/platform/dataset">
<Root xmlns:nexacro="http://www.nexacroplatform.com/platform/dataset">
<Root xmlns=".." version="1000">
[Table]
| ์์ฑ ์ด๋ฆ | ์ค๋ช
|
|:------------|:-------------------------------------------------------------------------------------------|
| xmlns | ๋ค์์คํ์ด์ค, ๋ง์ฝ ๊ธฐ๋ณธ ๋ค์์คํ์ด์ค๋ฅผ ์ฌ์ฉํ์ง ์๋ ๊ฒฝ์ฐ๋ผ๋ฉด xmlns:nexacro๋ก ๋ช
์ํฉ๋๋ค. |
| ver | Dataset Layout์ ๋ฒ์ ์ ๋ช
์ํฉ๋๋ค. |
### Parameters
๊ฐ์
ํต์ ์ ํ์ํ ํ๋ผ๋ฏธํฐ๋ฅผ ๋ช
์ํ๊ธฐ ์ํ ์์. ์ค์ ํ๋ผ๋ฏธํฐ๊ฐ์ ์์ ์์์ธ Parameter๊ฐ ๊ฐ์ง๊ณ ์์ผ๋ฉฐ, Parameters ์์๋ ์ด๋ค์ ๊ฐ์ง๊ณ ์๋ ์งํฉ์ ์๋ฏธ์
๋๋ค.
์์ ์์
Parameter
๋ฐ๋ณต ์ฌ๋ถ
์๊ฑฐ๋ 1๊ฐ๊ฐ ์์ ์ ์์ต๋๋ค.
### Parameters > Parameter
๊ฐ์
ํ๋ผ๋ฏธํฐ์ ๊ฐ์ ๋ช
์ํฉ๋๋ค.
์์ ์์
์๋ค.
๋ฐ๋ณต ์ฌ๋ถ
์๊ฑฐ๋ Parameter ์์๋ ํ๋ผ๋ฏธํฐ ๊ฐ์๋งํผ ๋ฐ๋ณต๋ ์ ์์ต๋๋ค.
์์ฑ
<Parameter id="ErrorMsg" type="STRING">SUCC</ Parameter >
[Table]
| ์์ฑ ์ด๋ฆ | ์ค๋ช
|
|:------------|:------------------|
| id | ํ๋ผ๋ฏธํฐ ์ด๋ฆ |
| type | ํ๋ผ๋ฏธํฐ๊ฐ์ ํ์
|
๋น๊ณ
๋ฅ์ฌํฌ๋ก์์๋ ๋ค์๊ณผ ๊ฐ์ ํ์ ํ๋ผ๋ฏธํฐ๋ฅผ ์ฌ์ฉํ๋๋ก ์ ์ํ๊ณ ์์ต๋๋ค. ๋ฅ์ฌํฌ๋ก์์ ์ฐ๋์ ์ํด์๋ ํ๋ผ๋ฏธํฐ๋ฅผ ์ค์ ํ์ฌ์ผ ํฉ๋๋ค.
<Parameter id="ErrorCode">1</Parameter>
<Parameter id="ErrorMsg">SUCC</Parameter>
<Parameter id="cachetype">Session</Parameter>
[Table]
| id | ์ค๋ช
|
|:----------|:----------------------------------------------------------------------------------------------------------|
| ErrorCode | Error Code. |
| | -Transaction ํจ์ ํธ์ถ ์ |
| | 0๋ณด๋ค ์์ ๊ฒฝ์ฐ์๋ ์ฌ์ฉ์๊ฐ ์ ์ํ ์๋ฌ๋ก InputDataset์ UpdateStatus๋ฅผ ๋ฐ์ํ์ง ์๊ณ ์คํจ ์ฒ๋ฆฌ๋ฉ๋๋ค. |
| | 0 ์ด์์ผ ๊ฒฝ์ฐ์๋ ์ฌ์ฉ์๊ฐ ์ ์ํ ์ ์ ์ํ๋ก InputDataset์ UpdateStatus๋ฅผ ๋ฐ์ํ๋ฉฐ ์ฑ๊ณต ์ฒ๋ฆฌ๋ฉ๋๋ค. |
| | -Load ํจ์ ํธ์ถ ์ |
| | 0๋ณด๋ค ์์ ๊ฒฝ์ฐ์๋ ์ฌ์ฉ์๊ฐ ์ ์ํ ์๋ฌ๋ก ์คํจ ์ฒ๋ฆฌ๋ฉ๋๋ค. |
| | 0 ์ด์์ผ ๊ฒฝ์ฐ์๋ ์ฌ์ฉ์๊ฐ ์ ์ํ ์ ์ ์ํ๋ก ์ฑ๊ณต ์ฒ๋ฆฌ๋ฉ๋๋ค. |
| | ๋ฏธ์ง์ ์ : 0 |
| ErrorMsg | Error Message |
| | ๋ฏธ์ง์ ์ : ErrorCode๊ฐ ๋ฏธ์ง์ ๋๋ 0์ผ ๋ SUCCESS, ๊ทธ ์ธ๋ FAILED |
| CacheType | Cache ๋ฐฉ๋ฒ์ Type์ ์ง์ ํ๋ค. Type์ Session, Dynamic, Static, None ๋ก ๊ตฌ๋ถ๋ฉ๋๋ค. |
| | ๋ฏธ์ง์ ์ : Session |
type์ ์ฌ ์ ์๋ ๋ฐ์ดํฐ ํ์
์ ๋ค์๊ณผ ๊ฐ์ต๋๋ค.
STRING: ๋ฌธ์์ด. ์ปฌ๋ผ์ ํฌ๊ธฐ์ ๊ด๊ณ์์ด ๊ธธ์ด ์ ํ์ด ์์ต๋๋ค. (๋จ ์์คํ
์์ ํ ๋ฒ์ ํ ๋น ๊ฐ๋ฅํ ํฌ๊ธฐ์ธ 2GB ์ ๋ ์ ํ๋ฉ๋๋ค)
๋น ๋ฌธ์์ด์ธ ๊ฒฝ์ฐ
<Parameter id="ErrorMsg" type="STRING"></Parameter>
Null์ธ ๊ฒฝ์ฐ
<Parameter id="ErrorMsg" type="STRING"/>๋ก ๊ตฌ๋ถํ๋ค.
INT: ์ ์(-231 ~ 231-1)
FLOAT, DECIMAL: (ยฑ2.2X10-308 ~ยฑ1.7X10308)
BIGDECIMAL: ์ค์(ยฑ10-1056 ~ ยฑ101056)
DATE: YYYYMMDD(-8192/01/01 ~ 8191/12/31)
DATETIME : YYYYMMDDHHmmssuuu (msecํฌํจ๊ฐ๋ฅ)
TIME : 6์๋ฆฌ HHmmssuuu(msecํฌํจ๊ฐ๋ฅ)
BLOB: ์ด์ง ๋ฐ์ดํฐ
### Dataset
๊ฐ์
ํ๋์ Dataset์ ๋ด์ฉ์ ๊ฐ์ ๊ฐ์ง๊ณ ์๋ ์์. ์์ ์์์๋ Dataset์ ๊ตฌ์กฐ๋ฅผ ํํํ๊ธฐ ์ํ ColumnInfo์ Dataset์ ์ค์ ๋ฐ์ดํฐ๋ฅผ ๊ฐ์ง Rows๊ฐ ์์ต๋๋ค.
์์ ์์
ColumnInfo, Rows
๋ฐ๋ณต ์ฌ๋ถ
์๊ฑฐ๋ xml์ด ์ ๋ฌํ๋ Dataset์ ๊ฐ์๋งํผ ๋ฐ๋ณต๋ ์ ์์ต๋๋ค.
์์ฑ
<Dataset id="History">
[Table]
| ์์ฑ ์ด๋ฆ | ์ค๋ช
|
|:------------|:-------------|
| id | Dataset ์ด๋ฆ |
### Dataset > ColumnInfo
๊ฐ์
Dataset์ ์คํค๋ง๋ฅผ ํํํ๊ธฐ ์ํ ์์. ์ค์ ์คํค๋ง์ ์ ๋ณด๋ ์์ ์์์ธ ConstColumn ๊ณผ Column์ด ํํํ๊ณ ColumnInfo๋ ์ด๋ค์ ํฌํจํ๋ ์งํฉ์ ์๋ฏธ๊ฐ ์์ต๋๋ค. ๊ณ ์ ๋ ๊ฐ์ ์ปฌ๋ผ์ ์คํค๋ง๋ ConstColumn ์ด ๋น ๊ณ ์ ๊ฐ์ ์ปฌ๋ผ์ ์คํค๋ง๋ Column์ด ํํํฉ๋๋ค.
์์ ์์
ConstColumn, Column
๋ฐ๋ณต ์ฌ๋ถ
์๊ฑฐ๋ 1๊ฐ๊ฐ ์์ ์ ์์ต๋๋ค.
์ฃผ์:
ColumnInfo์ ์์ ์๋ฆฌ๋จผํธ๋ค์ ConstColumn, Column ์์ผ๋ก ๋์ด๋์ด์ผ ํ๋ฉฐ ConstColumn์ด ํญ์ ๋จผ์ ๋์ด๋์ด์ผ ํฉ๋๋ค.
ConstColumn, Column์ด ์์ฌ์ ๋์ด๋๋ ๊ฒฝ์ฐ์๋ ์ฑ์์ ๋ฐ์ดํฐ๋ฅผ ์ฒ๋ฆฌํ์ง ๋ชปํ ์ ์์ต๋๋ค.
(X) ConstColumn์ด ๋จผ์ ๋์ด๋์ง ์์ ๊ฒฝ์ฐ
<ColumnInfo>
<Column id="stockCode" size="5" type="STRING"/>
<Column id="currentprice" size="10" type="INT"/>
<ConstColumn id="market" size="10" type="STRING" value="kse"/>
<ConstColumn id="openprice" size="10" type="INT" value="15000"/>
</ColumnInfo>
...
(X) ConstColumn, Column์ด ์์ฌ์๋ ๊ฒฝ์ฐ
<ColumnInfo>
<ConstColumn id="market" size="10" type="STRING" value="kse"/>
<Column id="currentprice" size="10" type="INT"/>
<ConstColumn id="openprice" size="10" type="INT" value="15000"/>
<Column id="stockCode" size="5" type="STRING"/>
</ColumnInfo>
...
### Dataset > ColumnInfo > ConstColumn
๊ฐ์
ํญ์ ๊ณ ์ ๋ ๊ฐ์ ๊ฐ๋ ์ปฌ๋ผ์ ์คํค๋ง๋ฅผ ํํํฉ๋๋ค.
์์ ์์
์๋ค.
๋ฐ๋ณต ์ฌ๋ถ
์๊ฑฐ๋ ๊ณ ์ ๊ฐ ์ปฌ๋ผ์ ๊ฐ์๋งํผ ์์ ์ ์์ต๋๋ค.
์์ฑ
<ConstColumn id="systemName"
size="255"
type="STRING"
value="Production"/>
[Table]
| ์์ฑ ์ด๋ฆ | ์ค๋ช
|
|:------------|:-------------------|
| id | ์ปฌ๋ผ ์ด๋ฆ |
| size | ์ต๋ ๋ฐ์ดํฐ ํฌ๊ธฐ |
| type | ์ปฌ๋ผ์ ๋ฐ์ดํฐ ํ์
|
| value | ์ปฌ๋ผ์ ๊ณ ์ ๊ฐ |
๋น๊ณ
type์ ์ฌ ์ ์๋ ๋ฐ์ดํฐ ํ์
์ ๋ค์๊ณผ ๊ฐ์ต๋๋ค.
STRING: ๋ฌธ์์ด. ์ปฌ๋ผ์ ํฌ๊ธฐ์ ๊ด๊ณ์์ด ๊ธธ์ด ์ ํ์ด ์์ต๋๋ค.(๋จ ์์คํ
์์ ํ ๋ฒ์ ํ ๋น ๊ฐ๋ฅํ ํฌ๊ธฐ์ธ 2GB ์ ๋๋ก ์ ํ๋ฉ๋๋ค)
INT: ์ ์(-231 ~ 231-1)
FLOAT, DECIMAL: (ยฑ2.2X10-308 ~ยฑ1.7X10308)
BIGDECIMAL: ์ค์(ยฑ10-1056 ~ ยฑ101056)
DATE: YYYYMMDD(-8192/01/01 ~ 8191/12/31)
DATETIME : YYYYMMDDHHmmssuuu (msecํฌํจ๊ฐ๋ฅ)
TIME : 6์๋ฆฌ HHmmssuuu(msecํฌํจ๊ฐ๋ฅ)
BLOB: ์ด์ง ๋ฐ์ดํฐ
### Dataset > ColumnInfo > Column
๊ฐ์
ํ๋ผ๋ฏธํฐ์ ๊ฐ์ ๋ช
์ํฉ๋๋ค.
์์ ์์
์๋ค.
๋ฐ๋ณต ์ฌ๋ถ
์๊ฑฐ๋ ๋น ๊ณ ์ ๊ฐ ์ปฌ๋ผ์ ๊ฐ์๋งํผ ์์ ์ ์์ต๋๋ค.
์์ฑ
<Column id="department"
size="255"
type="STRING"
prop="text"
sumtext="์๊ณ"/>
[Table]
| ์์ฑ ์ด๋ฆ | ์ค๋ช
|
|:------------|:--------------------------|
| id | ์ปฌ๋ผ ์ด๋ฆ |
| size | ์ต๋ ๋ฐ์ดํฐ ํฌ๊ธฐ |
| type | ์ปฌ๋ผ์ ๋ฐ์ดํฐ ํ์
|
| Prop | Summury์ type์ ์ ์ |
| Sumtext | porp๊ฐ์ด text์ผ ๋ ๋ฌธ์์ด |
๋น๊ณ
type์ ์ค์ ๋๋ ๊ฐ์ ColumnInfo์์์ type๊ณผ ๊ฐ์ต๋๋ค.
Prop์ ๋ค์๊ณผ ๊ฐ์ ๊ฐ์ ๊ฐ์ต๋๋ค.
count : ์ปฌ๋ผ์ row ๊ฐ์๋ฅผ summary ํ์ํฉ๋๋ค.
sum: ์ปฌ๋ผ์ row๊ฐ์ ํฉ์ summary์ ํ์ํฉ๋๋ค.
max: ์ปฌ๋ผ์ row๋ค ์ค Max๊ฐ์ summary์ ํ์ํฉ๋๋ค.
min: ์ปฌ๋ผ์ row๋ค ์ค Min๊ฐ์ summary์ ํ์ํฉ๋๋ค.
avg: ์ปฌ๋ผ์ row๊ฐ์ ํ๊ท ์ summary์ ํ์ํฉ๋๋ค.
Text: summary์ sumtext ์์ฑ๊ฐ์ ํ์ํฉ๋๋ค.
### Dataset > Rows
๊ฐ์
Dataset์ ๊ฐ Row๋ฅผ ํฌํจํ๊ธฐ ์ํ ์งํฉ ์๋ฏธ์ ์์. ์ค์ ๋ฐ์ดํฐ๋ฅผ ํํํ๋ Row๋ฅผ ์์ ์์๋ก ๊ฐ์ต๋๋ค.
์์ ์์
Row
๋ฐ๋ณต ์ฌ๋ถ
์๊ฑฐ๋ 1๊ฐ ์์ ์ ์์ต๋๋ค.
### Dataset > Rows > Row
๊ฐ์
Dataset์ ํ๋์ Row์ ๋ฐ์ดํฐ๋ฅผ ํํํ๊ธฐ ์ํ ์์. ์ค์ ๊ฐ ์ปฌ๋ผ์ ๊ฐ์ ํํํ๋ Col์ ์์ ์์๋ก ๊ฐ์ต๋๋ค. ๊ทธ๋ฆฌ๊ณ type์ด โupdate"์ผ ๊ฒฝ์ฐ ๋ณ๊ฒฝ๋๊ธฐ ์ ์ Row์ ๊ฐ์ ๊ฐ์ง๊ณ ์๋ Org_Row ์์ ์์๊ฐ ์์ต๋๋ค.
์์ ์์
Col, Org_Row
๋ฐ๋ณต ์ฌ๋ถ
์๊ฑฐ๋ Dataset์ Row ๊ฐ์๋งํผ ์์ ์ ์์ต๋๋ค.
์์ฑ
<Row type="insert">
<Col id="currentCode">10001</Col>
<Col id="currentprice">13400</Col>
</Row>
<Rows>
<Row type="update">
<Col id="currentCode">10001</Col>
<Col id="currentprice">13400</Col>
<OrgRow>
<Col id="currentCode">10001</Col>
<Col id="currentprice">13700</Col>
</OrgRow>
</Row>
</Rows>
<Row type="delete">
<Col id="currentCode">10001</Col>
<Col id="currentprice">13400</Col>
</Row>
[Table]
| ์์ฑ ์ด๋ฆ | ์ค๋ช
|
|:------------|:--------------------------------------------------------------------------------------------------------------|
| type | insert : ์๋ณธ Dataset์ ์ถ๊ฐ๋ Row. |
| type | update: ์๋ณธ Dataset์ ๋ณ๊ฒฝ๋ Row. ์์ ์์๋ก Org_Row๋ฅผ ํฌํจํฉ๋๋ค. Org_Row๋ ๋ณ๊ฒฝ ์ ์ ์๋ณธ Row์
๋๋ค. |
| type | delete: ์๋ณธ Dataset์ ์ญ์ ๋ Row๋ฅผ ์๋ฏธํฉ๋๋ค. |
### Dataset > Rows > Row > Col
๊ฐ์
Dataset์ ๊ฐ ์ปฌ๋ผ๊ฐ์ ํํํฉ๋๋ค.
์์ ์์
์์ต๋๋ค.
๋ฐ๋ณต ์ฌ๋ถ
์๊ฑฐ๋ ์ปฌ๋ผ์ ๊ฐ์๋งํผ ์์ ์ ์์ต๋๋ค.
์์ฑ
<Col id="department">management</Col>
[Table]
| ์์ฑ์ด๋ฆ | ์ค๋ช
|
|:-----------|:-----------------------------------------------------------------------------------------|
| Id | ์ปฌ๋ผ ์ด๋ฆ. ColumnInfo ์ ์์ ์์\(ConstColumn , Column\)์์ ์ค์ ํ ์ด๋ฆ๊ณผ ๊ฐ์ต๋๋ค. |
๋น๊ณ
๋น ๋ฌธ์์ด์ธ ๊ฒฝ์ฐ
<Col id="department"></Col>
or
<Col id="department"/>
Null์ธ ๊ฒฝ์ฐ Tag๊ฐ ์๋ ๊ฒ์ผ๋ก ๊ตฌ๋ถํฉ๋๋ค.
### Dataset > Rows > Row > OrgRow
๊ฐ์
Dataset์ Row์ ๊ฐ์ด ๋ณ๊ฒฝ๋์์ ๋, ์๋ ๊ฐ์ ๊ฐ์ง๊ณ ์๋ ์์. ์์ ์์๋ก ์ค์ ๊ฐ์ ๊ฐ์ง๊ณ ์๋ Col์ด ์์ต๋๋ค.
์์ ์์
Col
๋ฐ๋ณต ์ฌ๋ถ
์๊ฑฐ๋ 1๊ฐ ์์ ์ ์์ต๋๋ค.
๋น๊ณ
๋ถ๋ชจ ์์์ธ Row์ ์ ์ฌํ๋ ์์ฑ์ด ์์ต๋๋ค.
### Dataset > Rows > Row > OrgRow > Col
๊ฐ์
๋ณ๊ฒฝ๋๊ธฐ ์ ์ Column ๊ฐ์ ํํํฉ๋๋ค.
์์ ์์
์์ต๋๋ค.
๋ฐ๋ณต ์ฌ๋ถ
์๊ฑฐ๋ ์ปฌ๋ผ์ ๊ฐ์๋งํผ ์์ ์ ์์ต๋๋ค.
์์ฑ
<Col id="department">management</Col>
[Table]
| ์์ฑ ์ด๋ฆ | ์ค๋ช
|
|:------------|:-----------------------------------------------------------------------------------------|
| id | ์ปฌ๋ผ ์ด๋ฆ. ColumnInfo ์ ์์ ์์\(ConstColumn , Column\)์์ ์ค์ ํ ์ด๋ฆ๊ณผ ๊ฐ์ต๋๋ค. |
<|eot_id|>
|
<|begin_of_text|>๋ฅ์ฌํฌ๋ก ๊ฐ์ด๋ ๋ถ(์์ฉ๊ฐ๋ฐ ๊ฐ์ด๋) title: Dataset SSV Format contents: Dataset ์ค๋ธ์ ํธ ๋ฐ์ดํฐ๋ฅผ SSV(Simple Separated Values) ํํ๋ก ์ฒ๋ฆฌํ๊ธฐ ์ํ ๋ ์ด์์์ ์ค๋ช
ํฉ๋๋ค.
๋
ธํธ:
๋ณธ๋ฌธ์์ ์ฃผ์ ์ฉ์ด๋ ์๋์ ๊ฐ์ด ์ค์ฌ์ ํ์ํฉ๋๋ค.
* (RS): RS(Record Seperator) / 0x1E(30)
* (US): US(Unit Separator) / 0x1F(31)
๋
ธํธ:
์ด์ ํ๊ฒฝ์ ๋ฐ๋ผ (RS), (US)๋ ๋ฅ์ฌํฌ๋ก ์คํ๋์ค์์ ๋ค๋ฅธ ์ฝ๋๋ก ๋ณ๊ฒฝํ ์ ์์ต๋๋ค.
* Environment.ssvrecordseparator
* Environment.ssvunitseparator
## Dataset SSV layout
Dataset SSV๋ ์๋์ ๊ฐ์ ํ์์ผ๋ก ๊ตฌ์ฑํฉ๋๋ค.
[Table]
| ํญ๋ชฉ | ํ์ |
|:--------------|:-------|
| Stream Header | O |
| Variables | X |
| Datasets | X |
### Stream Header
SSV{:CodePage}(RS)
Stream Header๋ "SSV"๋ก ์์ํ๊ณ ํ์ํ ๊ฒฝ์ฐ ์ฝ๋ก (:) ๋ค์์ CodePage ๊ฐ์ ์ถ๊ฐํ ์ ์์ต๋๋ค. (RS)๋ก ๋ค์ ํญ๋ชฉ(Variables ๋๋ Datasets)๊ณผ ๊ตฌ๋ถํฉ๋๋ค.
[Table]
| ํญ๋ชฉ | ํ์ | ์ค๋ช
|
|:---------|:-------|:----------------------------------------|
| SSV | O | "SSV"๋ก ๊ณ ์ ๋ ๊ฐ์
๋๋ค. |
| CodePage | X | ":" ๋ฌธ์๋ก ์์ํ๋ฉฐ ์ธ์ฝ๋ฉ ์ ๋ณด์
๋๋ค. |
SSV(RS)
SSV:en_US(RS)
SSV:utf-8(RS)
### Variables
์๋ตํ๊ฑฐ๋ 1๊ฐ ์ด์์ Variable์ ๊ฐ์ง ์ ์์ต๋๋ค. n๊ฐ์ Variable์ (RS)๋ก ๊ตฌ๋ถํ๋ฉฐ (RS)๋ก Datasets์ ๊ตฌ๋ถํฉ๋๋ค.
#### Variable
Variable ID{:Type(Length)}{=Value}(RS)
Variable ID{:Type}{=Value}(RS)
[Table]
| ํญ๋ชฉ | ํ์ | ์ค๋ช
|
|:------------|:-------|:-----------------------------------------------------------------|
| Variable ID | O | ๊ณ ์ ID๋ก ์ค๋ณต๋ ๊ฐ์ด ๋ค์ด์ค๋ฉด ๋ง์ง๋ง์ ๋ค์ด์จ ๊ฐ๋ง ์ฒ๋ฆฌํฉ๋๋ค. |
| Type | X | ":" ๋ฌธ์๋ก ์์ํ๋ฉฐ Length ์ ๋ณด๋ฅผ ํฌํจํ ์ ์์ต๋๋ค. |
| | | ์๋ตํ ๊ฒฝ์ฐ "STRING"์ผ๋ก ์ฒ๋ฆฌํฉ๋๋ค. |
| Length | X | "\("๋ฌธ์์ "\)"๋ฌธ์ ์ฌ์ด์ ๊ฐ์ผ๋ก ์ฒ๋ฆฌํฉ๋๋ค. |
| | | ์๋ตํ ๊ฒฝ์ฐ Type์ ๋ฐ๋ฅธ ์๊ณ์น๋ก ์ฒ๋ฆฌํฉ๋๋ค. |
| | | ๋จ, Type์ด "STRING"์ธ ๊ฒฝ์ฐ์๋ 255๋ก ์ฒ๋ฆฌํฉ๋๋ค. |
| Value | X | "="๋ฌธ์๋ก ์์ํ๋ฉฐ \(RS\)๊ฐ ๋์ค๊ธฐ ์ ๊น์ง Value๋ก ์ฒ๋ฆฌํฉ๋๋ค. |
name1=value(RS)
name1=value1(RS)name2=value2(RS)
name1:STRING=value1(RS)name2=value2(RS)
name3=value3(RS)name4:STRING(10)=value4(RS)
### Datasets
์๋ตํ๊ฑฐ๋ 1๊ฐ ์ด์์ Dataset์ ๊ฐ์ง ์ ์์ต๋๋ค.
#### Dataset
Dataset์ ์๋์ ๊ฐ์ ํ์์ ๊ฐ์ง๋๋ค.
[Table]
| ํญ๋ชฉ | ํ์ |
|:-------------------|:-------|
| Dataset Header | O |
| Const Column Infos | X |
| Column Infos | O |
| Records | X |
| Null Record | O |
์ฃผ์:
Const Column Infos๊ฐ ์์ ๊ฒฝ์ฐ Column Info๋ณด๋ค ๋จผ์ ๋์ดํด์ผ ํฉ๋๋ค.
์์๊ฐ ๋ฐ๋๊ฑฐ๋ Column Info ๋ค์ ๋ค์ Const Column Infos ์ ๋ณด๋ฅผ ๋์ดํ๋ ๊ฒฝ์ฐ ์ ์์ ์ธ ๋์์ ๋ณด์ฅํ์ง ์์ต๋๋ค.
## Dataset ํ์ ์์ธ
Dataset์ ๊ฐ ํญ๋ชฉ์ ์ค๋ช
ํฉ๋๋ค.
### Dataset Header
Dataset:Dataset ID(RS)
Dataset Header๋ "Dataset"๋ก ์์ํ๊ณ ์ฝ๋ก (:) ๋ค์์ Dataset ID๋ฅผ ์์ฑํฉ๋๋ค. (RS)๋ก ๋ค์ ํญ๋ชฉ๊ณผ ๊ตฌ๋ถํฉ๋๋ค.
### Const Column Infos
_Const_(US)Const Column ID{:Type(Length)}{=Value}(RS)
_Const_(US)Const Column ID{:Type}{=Value}(RS)
"_Const_"๋ก ์์ํ๊ณ 1๊ฐ ์ด์์ Const Column Info๋ฅผ ๊ฐ์ง ์ ์์ต๋๋ค. n๊ฐ์ Const Column Info๋ (US)๋ก ๊ตฌ๋ถํ๋ฉฐ (RS)๋ก ๋ค์ ํญ๋ชฉ๊ณผ ๊ตฌ๋ถํฉ๋๋ค.
[Table]
| ํญ๋ชฉ | ํ์ | ์ค๋ช
|
|:----------------|:-------|:---------------------------------------------------------------------------|
| _Const_ | O | "_Const_"๋ก ๊ณ ์ ๋ ๊ฐ์
๋๋ค. |
| Const Column ID | O | Dataset์์ Const Column ID๋ก ์ฌ์ฉํ ID ๊ฐ์
๋๋ค. |
| Type | X | ":" ๋ฌธ์๋ก ์์ํ๋ฉฐ Length ์ ๋ณด๋ฅผ ํฌํจํ ์ ์์ต๋๋ค. |
| | | ์๋ตํ ๊ฒฝ์ฐ "STRING"์ผ๋ก ์ฒ๋ฆฌํฉ๋๋ค. |
| Length | X | "\("๋ฌธ์์ "\)"๋ฌธ์ ์ฌ์ด์ ๊ฐ์ผ๋ก ์ฒ๋ฆฌํฉ๋๋ค. |
| | | ์๋ตํ ๊ฒฝ์ฐ Type์ ๋ฐ๋ฅธ ์๊ณ์น๋ก ์ฒ๋ฆฌํฉ๋๋ค. |
| | | ๋จ, Type์ด "STRING"์ธ ๊ฒฝ์ฐ์๋ 255๋ก ์ฒ๋ฆฌํฉ๋๋ค. |
| Value | X | "="๋ฌธ์๋ก ์์ํ๋ฉฐ \(US\) ๋๋ \(RS\)๊ฐ ๋์ค๊ธฐ ์ ๊น์ง Value๋ก ์ฒ๋ฆฌํฉ๋๋ค. |
### Column Infos
_RowType_(US)Column ID{:Type(Length)}{:Sum Type}{:Sum Text}(RS)
_RowType_(US)Column ID{:Type}{:Sum Type}{:Sum Text}(RS)
"_RowType_"๋ก ์์ํ๊ณ 1๊ฐ ์ด์์ Column Info๋ฅผ ๊ฐ์ง ์ ์์ต๋๋ค. n๊ฐ์ Column Info๋ (US)๋ก ๊ตฌ๋ถํ๋ฉฐ (RS)๋ก ๋ค์ ํญ๋ชฉ๊ณผ ๊ตฌ๋ถํฉ๋๋ค.
[Table]
| ํญ๋ชฉ | ํ์ | ์ค๋ช
|
|:------------|:-------|:--------------------------------------------------------------|
| _RowType_ | O | "_RowType_"๋ก ๊ณ ์ ๋ ๊ฐ์
๋๋ค. |
| Column ID | O | Dataset์์ Column ID๋ก ์ฌ์ฉํ ID ๊ฐ์
๋๋ค. |
| Type | X | ":" ๋ฌธ์๋ก ์์ํ๋ฉฐ Length ์ ๋ณด๋ฅผ ํฌํจํ ์ ์์ต๋๋ค. |
| | | ์๋ตํ ๊ฒฝ์ฐ "STRING"์ผ๋ก ์ฒ๋ฆฌํฉ๋๋ค. |
| Length | X | "\("๋ฌธ์์ "\)"๋ฌธ์ ์ฌ์ด์ ๊ฐ์ผ๋ก ์ฒ๋ฆฌํฉ๋๋ค. |
| | | ์๋ตํ ๊ฒฝ์ฐ Type์ ๋ฐ๋ฅธ ์๊ณ์น๋ก ์ฒ๋ฆฌํฉ๋๋ค. |
| | | ๋จ, Type์ด "STRING"์ธ ๊ฒฝ์ฐ์๋ 255๋ก ์ฒ๋ฆฌํฉ๋๋ค. |
| Sum Type | X | ":"๋ฌธ์๋ก ColumnInfo ์ค๋ธ์ ํธ์ prop ์์ฑ๊ฐ์ ์ค์ ํฉ๋๋ค. |
| Sum Text | X | ":"๋ฌธ์๋ก ColumnInfo ์ค๋ธ์ ํธ์ sumtext ์์ฑ๊ฐ์ ์ค์ ํฉ๋๋ค. |
### Records
RowType(US)Column Value(RS)
์ฒซ ๋ฒ์งธ ํ๋๊ฐ์ RowType์ด๊ณ ๊ทธ ์ดํ ํ๋๊ฐ์ Column Infos์์ ์ค์ ํ Column ์์๋๋ก ์์ฑํฉ๋๋ค. ๊ฐ ํ๋๊ฐ์ (US)๋ก ๊ตฌ๋ถํฉ๋๋ค.
[Table]
| ํญ๋ชฉ | ํ์ | ์ค๋ช
|
|:-------------|:-------|:----------------------------------------------------------------------------------------------------------|
| RowType | O | ๋ ์ฝ๋ ํํ๋ฅผ ์์ฑํฉ๋๋ค. |
| | | N: Normal Record |
| | | I: Inserted Record |
| | | U: Updated Record |
| | | D: Deleted Record |
| | | O: Original Record \(Update Record์ ์๋ณธ ๋ ์ฝ๋์
๋๋ค. Update Record๊ฐ ์๋ ๊ฒฝ์ฐ ์ฌ์ฉํ ์ ์์ต๋๋ค\). |
| Column Value | O | Dataset์์ Column Value๋ก ์ฌ์ฉํ ๊ฐ์
๋๋ค. |
| | | Column Value๋ฅผ undefined๋ก ์ฒ๋ฆฌํ๊ณ ์ ํ๋ค๋ฉด "ETX \(End of Text\) / 0x03\(03\)"์ ์ฌ์ฉํฉ๋๋ค. |
### Null Record
(RS)๋ก Dataset์ ๋์ ๊ตฌ๋ถํฉ๋๋ค.
## ์ฐธ๊ณ
### Type
Variable, Const Column Infos, Column Infos์์ Type ํญ๋ชฉ์ ์ฌ์ฉํ ์ ์๋ ๊ฐ์ ์๋์ ๊ฐ์ต๋๋ค.
[Table]
| Type | ์ค๋ช
|
|:---------------|:--------------------------------------------------------------------|
| STRING | ๋ฌธ์์ด. ์ต๋๊ฐ์ system์์ ํ๋ฒ์ ํ ๋น ๊ฐ๋ฅํ ํฌ๊ธฐ์ธ 2GB๋ก ์ ํ๋จ |
| | Column์ size์ ๊ด๊ณ์์ด ์ต๋์น๊น์ง ์ฌ์ฉ๋ ์ ์๋ค. |
| INT | ์ ์ํ \(-231 ~ 231-1\) |
| FLOAT, DECIMAL | ์ค์ํ \(ยฑ2.2X10-308 ~ ยฑ1.7X10308\) |
| BIGDECIMAL | ์ค์ํ\(๋ฌธ์์ด๋ก ์ ์ฅ\) \(ยฑ10-1056 ~ ยฑ10\+1056\) |
| DATE | ๋ ์งํ YYYYMMDD \(-8192/01/01 ~ 8191/12/31\) |
| DATETIME | YYYYMMDDHHmmssuuu \(msecํฌํจ๊ฐ๋ฅ\) |
| TIME | 6์๋ฆฌ HHmmssuuu\(msecํฌํจ๊ฐ๋ฅ\) |
| BLOB | ์ด์ง ๋ฐ์ดํฐ |
### ์์
๋
ธํธ:
* (RS), (US)๋ ์๋ ๊ธฐํธ๋ก ํ์ํ์ต๋๋ค.
+ โผ = Record Seperator(RS)
+ โข = Unit Seperator(US)
* ์ฝ๊ฒ ์ฝ๊ธฐ ์ํด ์ค๋ฐ๊ฟ์ ์ถ๊ฐํ์ต๋๋ค. ์ค์ SSV ๊ตฌ์ฑ ์์๋ ์ค๋ฐ๊ฟ์ ์ถ๊ฐํ์ง ์์ต๋๋ค.
#### Dataset์ด 1๊ฐ ์กด์ฌํ๋ ๊ฒฝ์ฐ
SSV:utf-8โผ
Dataset:dataset0โผ
_RowType_โขCol1:String(20)โขCol2:Int:SUMโขCol3:Decimal:AVGโผ
NโขTestโข0โข1โข1โผ
IโขAbcโข1โข2โข2โผ
UโขDefโข2โข3โข3โผ
OโขChkโข2โข3โข3โผ
DโขGhiโข3โข4โข4โผ
โผ
#### Const Column์ด ์กด์ฌํ๋ Dataset์ด 1๊ฐ ์กด์ฌํ๋ ๊ฒฝ์ฐ
SSV:utf-8โผ
Dataset:dataset0โผ
_Const_โขConstCol1:STRING(20)=NameโขConstCol2:INT=1โขConstCol3:DECIMAL=0.8โผ
_RowType_โขCol1:STRING(20)โขCol2:INT:SUMโขCol3:DECIMAL:AVGโผ
NโขTestโข0โข1โข1โผ
IโขAbcโข1โข2โข2โผ
UโขDefโข2โข3โข3โผ
OโขChkโข2โข3โข3โผ
DโขGhiโข3โข4โข4โผ
โผ
#### Dataset์ด ์ฌ๋ฌ ๊ฐ ์กด์ฌํ๋ ๊ฒฝ์ฐ
SSV:utf-8โผ
Dataset:dataset0โผ
_Const_โขConstCol1:STRING(20)=NameโขConstCol2:INT=1โขConstCol3:DECIMAL=0.8โผ
_RowType_โขCol1:STRING(20)โขCol2:INT:SUMโขCol3:DECIMAL:AVGโผ
NโขTestโข0โข1โข1โผ
IโขAbcโข1โข2โข2โผ
UโขDefโข2โข3โข3โผ
OโขChkโข2โข3โข3โผ
DโขGhiโข3โข4โข4โผ
โผ
Dataset:dataset1โผ
_RowType_โขCol1:INT(4):Summ,Col2:STRING(30):Textโผ
Nโข0โขtestโผ
Iโข1โขtest1โผ
Uโข2โขtest3โผ
Oโข2โขtest3-1โผ
Dโข3โขtest4โผ
โผ
#### Variable๋ง ์กด์ฌํ๋ ๊ฒฝ์ฐ
SSV:utf-8โผ
Var4=10โผVar5=20โผ
โผ
#### Variable๊ณผ Dataset์ด ์กด์ฌํ๋ ๊ฒฝ์ฐ
SSV:utf-8โผ
Var4=10โผVar5=20โผ
Dataset:dataset0โผ
_Const_โขConstCol1:STRING(20)=NameโขConstCol2:INT=1โขConstCol3:DECIMAL=0.8โผ
_RowType_โขCol1:STRING(20)โขCol2:INT:SUMโขCol3:DECIMAL:AVGโผ
Nโข0โขtestโผ
Iโข1โขtest1โผ
Uโข2โขtest3โผ
Oโข2โขtest3-1โผ
Dโข3โขtest4โผ
โผ
<|eot_id|>
|
<|begin_of_text|>๋ฅ์ฌํฌ๋ก ๊ฐ์ด๋ ๋ถ(์์ฉ๊ฐ๋ฐ ๊ฐ์ด๋) title: Dataset JSON Format contents: Dataset ์ค๋ธ์ ํธ ๋ฐ์ดํฐ๋ฅผ JSON(JavaScript Object Notation) ํํ๋ก ์ฒ๋ฆฌํ๊ธฐ ์ํ ๋ ์ด์์์ ์ค๋ช
ํฉ๋๋ค.
## Dataset JSON layout
Dataset JSON๋ ์๋์ ๊ฐ์ ํ์์ผ๋ก ๊ตฌ์ฑํฉ๋๋ค.
[Table]
| ํญ๋ชฉ | ํ์ |
|:-----------|:-------|
| version | O |
| Parameters | X |
| Datasets | X |
### version
Dataset Layout ์ ๋ฒ์ ์ ๋ช
์ํฉ๋๋ค.
"version" : "1.0",
### Parameters
ํ๋ผ๋ฏธํฐ์ ๊ฐ์ ๋ช
์ํฉ๋๋ค.
"Parameters":
[
{"id": "ErrorCode", "value":0},
{"id": "ErrorMsg", "value":""},
{"id": "param1", "value":0},
{"id": "param2", "value":"0", "type":"string"}
]
[Table]
| ์์ฑ๋ช
| ํ์ | ์ค๋ช
|
|:---------|:-------|:-----------------------------------------------------------------------------------------------------------------|
| id | O | ํ๋ผ๋ฏธํฐ๋ช
์ ์ค์ ํฉ๋๋ค. |
| | | "ErrorCode", "ErrorMsg" ํญ๋ชฉ์ ์์ฝ๋ ํค์๋์
๋๋ค. |
| | | "ErrorCode" ํญ๋ชฉ์ ์ง์ ํ์ง ์์ ๊ฒฝ์ฐ value๋ 0์ผ๋ก ์ฒ๋ฆฌํฉ๋๋ค. |
| | | "ErrorMsg" ํญ๋ชฉ์ ์ง์ ํ์ง ์์ ๊ฒฝ์ฐ "ErrorCode" value๊ฐ 0์ด๋ฉด "SUCCESS", ๊ทธ ์ธ์ ๊ฐ์ด๋ฉด "FAILED:๋ก ์ฒ๋ฆฌํฉ๋๋ค. |
| value | X | Integer, Float, String |
| type | X | ๋ฐ์ดํฐ ํ์
์ ์ค์ ํฉ๋๋ค. |
| | | type ํญ๋ชฉ์ ์ฐธ๊ณ ํ์ธ์. |
"ErrorCode", "ErrorMsg" ํญ๋ชฉ์ ์์ฝ๋ ํค์๋์
๋๋ค.
"ErrorCode" ํญ๋ชฉ์ ์ง์ ํ์ง ์์ ๊ฒฝ์ฐ 0์ผ๋ก ์ฒ๋ฆฌํฉ๋๋ค.
"ErrorMsg" ํญ๋ชฉ์ ์ง์ ํ์ง ์์ ๊ฒฝ์ฐ "ErrorCode" ํญ๋ชฉ๊ฐ์ด 0์ด๋ฉด "SUCCESS", ๊ทธ ์ธ์ ๊ฐ์ด๋ฉด "FAILED:๋ก ์ฒ๋ฆฌํฉ๋๋ค.
### Datasets
Dataset ์ค๋ธ์ ํธ ์ ๋ณด๋ฅผ ํฌํจํ๋ ์์๋ก ๋ฐฐ์ด ๋ด ์ค๋ธ์ ํธ ํํ๋ก Dataset์ ๊ฐ์ง๊ณ ์์ต๋๋ค.
#### Dataset
ํ๋์ Dataset ์ค๋ธ์ ํธ ์ ๋ณด๋ฅผ ๊ฐ์ง๊ณ ์๋ ์์๋ก Dataset ์ค๋ธ์ ํธ์ ๊ตฌ์กฐ๋ฅผ ํํํ๊ธฐ ์ํ ColumnInfo์ Dataset ์ค๋ธ์ ํธ์ ์ค์ ๋ฐ์ดํฐ๋ฅผ ๊ฐ์ง๊ณ ์๋ Rows๊ฐ ํฌํจ๋ฉ๋๋ค.
[Table]
| ํญ๋ชฉ | ํญ๋ชฉ | ํ์ |
|:-----------|:------------|:-------|
| id | id | O |
| ColumnInfo | ColumnInfo | O |
| | ConstColumn | X |
| | Column | O |
| Rows | Rows | O |
## Dataset ํ์ ์์ธ
Dataset์ ๊ฐ ํญ๋ชฉ์ ์ค๋ช
ํฉ๋๋ค.
### id
"id":"inData"
[Table]
| ์์ฑ๋ช
| ํ์ | ์ค๋ช
|
|:---------|:-------|:-----------------------------------|
| id | O | Dataset ์ค๋ธ์ ํธ id ์์ฑ๊ฐ์
๋๋ค. |
### ColumnInfo > ConstColumn
"ColumnInfo":
{
"ConstColumn":
[
{"id":"ConstCol1", "value":10},
{"id":"ConstCol2", "type":"string", "size":"256", "value":10},
{"id":"ConstCol3"}
]
}
[Table]
| ์์ฑ๋ช
| ํ์ | ์ค๋ช
|
|:---------|:-------|:------------------------------------------------------------|
| id | O | Dataset ์ค๋ธ์ ํธ์์ Const Column ID๋ก ์ฌ์ฉํ ID ๊ฐ์
๋๋ค. |
| type | X | ๋ฐ์ดํฐ ํ์
์ ์ค์ ํฉ๋๋ค. |
| | | type ํญ๋ชฉ์ ์ฐธ๊ณ ํ์ธ์. |
| size | X | ์ต๋ ๋ฐ์ดํฐ ํฌ๊ธฐ๋ฅผ ์ค์ ํฉ๋๋ค. |
| | | ์๋ตํ ๊ฒฝ์ฐ Type์ ๋ฐ๋ฅธ ์๊ณ์น๋ก ์ฒ๋ฆฌํฉ๋๋ค. |
| | | ๋จ, type์ด "STRING"์ธ ๊ฒฝ์ฐ์๋ 255๋ก ์ฒ๋ฆฌํฉ๋๋ค. |
| value | X | ๊ณ ์ ๊ฐ์ ์ค์ ํฉ๋๋ค. |
| | | ์ค์ ํ์ง ์์ผ๋ฉด undefined๋ก ์ฒ๋ฆฌ๋ฉ๋๋ค. |
### ColumnInfo > Column
"ColumnInfo":
{
"Column" :
[
{"id":"Column0"},
{"id":"Column1", "type":"string", "size":"256"},
{"id":"Column2", "type":"string", "size":"256"}
]
}
[Table]
| ์์ฑ๋ช
| ํ์ | ์ค๋ช
|
|:---------|:-------|:----------------------------------------------------|
| id | O | Dataset์์ Column ID๋ก ์ฌ์ฉํ ID ๊ฐ์
๋๋ค. |
| type | X | ๋ฐ์ดํฐ ํ์
์ ์ค์ ํฉ๋๋ค. |
| | | ์๋ตํ ๊ฒฝ์ฐ "STRING"์ผ๋ก ์ฒ๋ฆฌํฉ๋๋ค. |
| | | type ํญ๋ชฉ์ ์ฐธ๊ณ ํ์ธ์. |
| size | X | ์ต๋ ๋ฐ์ดํฐ ํฌ๊ธฐ๋ฅผ ์ค์ ํฉ๋๋ค. |
| | | ์๋ตํ ๊ฒฝ์ฐ Type์ ๋ฐ๋ฅธ ์๊ณ์น๋ก ์ฒ๋ฆฌํฉ๋๋ค. |
| | | ๋จ, type์ด "STRING"์ธ ๊ฒฝ์ฐ์๋ 255๋ก ์ฒ๋ฆฌํฉ๋๋ค. |
| prop | X | ColumnInfo ์ค๋ธ์ ํธ์ prop ์์ฑ๊ฐ์ ์ค์ ํฉ๋๋ค. |
| sumtext | X | ColumnInfo ์ค๋ธ์ ํธ์ sumtext ์์ฑ๊ฐ์ ์ค์ ํฉ๋๋ค. |
### Rows
"Rows":
[
{"_RowType_":"U", "Column0":"", "Column1":"zzz", "Column2":""},
{"_RowType_":"O", "Column0":"", "Column2":""},
{"_RowType_":"N", "Column0":"A", "Column1":"B", "Column2":""},
{"_RowType_":"D", "Column0":"a", "Column1":"b", "Column2":"c"},
{"_RowType_":"I", "Column0":"", "Column1":"", "Column2":""}
]
"Rows":
[
{"Column0":"A", "Column1":"B"},
{"Column0":"a", "Column1":"b", "Column2":"c"},
{"Column0":"", "Column1":"", "Column2":""}
]
[Table]
| ์์ฑ๋ช
| ํ์ | ์ค๋ช
|
|:-------------------|:-------|:---------------------------------------------------------|
| _RowType_ | X | ๋ ์ฝ๋ ํํ๋ฅผ ์ค์ ํฉ๋๋ค. |
| | | N: Normal Record \(Default\) |
| | | I: Inserted Record |
| | | U: Updated Record |
| | | D: Deleted Record |
| | | O: Original Record \(Update Record์ ์๋ณธ ๋ ์ฝ๋์
๋๋ค\) |
| \<ConstColumn id\> | X | ConstColumn ๊ฐ์ ์ค์ ํฉ๋๋ค. |
| \<Column id\> | O | Column ๊ฐ์ ์ค์ ํฉ๋๋ค. |
Row ๋ฐ์ดํฐ๋ ์์์ ์๋ฏธ๋ฅผ ๊ฐ์ง๋๋ค.
_RowType_ ์์ฑ๊ฐ์ด โOโ ์ธ ๊ฒฝ์ฐ๋ ๋ฐ๋ก ์ Row ์ Original row ์์ ์๋ฏธํฉ๋๋ค.
๋ฐ๋ก ์์ _RowType_ ์์ฑ๊ฐ์ด โUโ ์ธ ๊ฒฝ์ฐ์๋ง ์ ์ ๋์ํฉ๋๋ค.
_RowType_ ์์ฑ๊ฐ์ด โOโ์ด๊ณ ๋ฐ๋ก ์ Row ์ _RowType_ ์์ฑ๊ฐ์ด "U"๊ฐ ์๋ ๊ฒฝ์ฐ ํด๋น Row๋ ๋ฌด์ํฉ๋๋ค. ๋ํ ์ฒซ๋ฒ์งธ row์ _RowType_ ์์ฑ๊ฐ์ด โOโ ์ธ ๊ฒฝ์ฐ์๋ Row๋ ๋ฌด์๋ฉ๋๋ค.
## ์ฐธ๊ณ
### type
Parameters, ConstColumn, Column์์ type ํญ๋ชฉ์ ์ฌ์ฉํ ์ ์๋ ๊ฐ์ ์๋์ ๊ฐ์ต๋๋ค.
๋
ธํธ:
Parameters, ConstColumn์ ๊ฒฝ์ฐ ์ค์ ํ์ง ์์ผ๋ฉด value์ ๋ฐ๋ผ Integer, Float์ ๊ฒฝ์ฐ์๋ type์ด "INT", "FLOAT"๋ก ์ฒ๋ฆฌ๋๊ณ ๊ทธ ์ธ์๋ "STRING"์ผ๋ก ์ฒ๋ฆฌ๋ฉ๋๋ค.
[Table]
| Type | ์ค๋ช
|
|:---------------|:--------------------------------------------------------------------|
| STRING | ๋ฌธ์์ด. ์ต๋๊ฐ์ system์์ ํ๋ฒ์ ํ ๋น ๊ฐ๋ฅํ ํฌ๊ธฐ์ธ 2GB๋ก ์ ํ๋จ |
| | Column์ size์ ๊ด๊ณ์์ด ์ต๋์น๊น์ง ์ฌ์ฉ๋ ์ ์๋ค. |
| INT | ์ ์ํ \(-231 ~ 231-1\) |
| FLOAT, DECIMAL | ์ค์ํ \(ยฑ2.2X10-308 ~ ยฑ1.7X10308\) |
| BIGDECIMAL | ์ค์ํ\(๋ฌธ์์ด๋ก ์ ์ฅ\) \(ยฑ10-1056 ~ ยฑ10\+1056\) |
| DATE | ๋ ์งํ YYYYMMDD \(-8192/01/01 ~ 8191/12/31\) |
| DATETIME | YYYYMMDDHHmmssuuu \(msecํฌํจ๊ฐ๋ฅ\) |
| TIME | 6์๋ฆฌ HHmmssuuu\(msecํฌํจ๊ฐ๋ฅ\) |
| BLOB | ์ด์ง ๋ฐ์ดํฐ |
### JSON ์
{
"version" : "1.0",
"Parameters":
[
{"id":"ErrorCode", "value":0},
{"id":"ErrorMsg", "value":""},
{"id":"param1", "value":0},
{"id":"param2", "value":"0", "type":"string"}
],
"Datasets" :
[
{
"id":"indata",
"ColumnInfo":
{
"ConstColumn":
[
{"id":"ConstCol1", "value":10},
{"id":"ConstCol2", "type":"string", "size":"256", "value":10},
{"id":"ConstCol3"}
],
"Column" :
[
{"id":"Column0"},
{"id":"Column1", "type":"string", "size":"256"},
{"id":"Column2", "type":"string", "size":"256"}
]
},
"Rows":
[
{"_RowType_":"U", "Column0":"", "Column1":"zzz", "Column2":""},
{"_RowType_":"O", "Column0":"", "Column2":""},
{"_RowType_":"N", "Column0":"A", "Column1":"B", "Column2":""},
{"_RowType_":"D", "Column0":"a", "Column1":"b", "Column2":"c"},
{"_RowType_":"I", "Column0":"", "Column1":"", "Column2":""}
]
},
{
"id": "indata2",
"ColumnInfo":
{
"Column":
[
{"id":"Column0"},
{"id":"Column1", "type":"string", "size":"256"},
{"id":"Column2", "type":"string", "size":"256"}
]
},
"Rows":
[
{"Column0":"A", "Column1":"B"},
{"Column0":"a", "Column1":"b", "Column2":"c"},
{"Column0":"", "Column1":"", "Column2":""}
]
}
]
}<|eot_id|>
|
README.md exists but content is empty.
- Downloads last month
- 1