PDA

View Full Version : [CLOSED] DataStore ArrayStore single quote issue



Artistan
3 Aug 2010, 5:38 AM
when creating an array with a single quote within all the double quotes it does not export properly.
I also tried to slash the single quote to escape it, this also does not work.

EXAMPLE (countries)
use this as data for ArrayStore and export, will not work, I ended up using ticks (`) for now.



[
["","N/A"],
["ALB","ALBANIA"],
["DZA","ALGERIA"],
["ASM","AMERICAN SAMOA"],
["AND","ANDORRA"],
["AGO","ANGOLA"],
["AIA","ANGUILLA"],
["ATA","ANTARCTICA"],
["ATG","ANTIGUA AND BAR"],
["ARG","ARGENTINA"],
["ARM","ARMENIA"],
["ABW","ARUBA"],
["AUS","AUSTRALIA"],
["AUT","AUSTRIA"],
["AZE","AZERBAIJAN"],
["BHS","BAHAMAS"],
["BHR","BAHRAIN"],
["BGD","BANGLADESH"],
["BRB","BARBADOS"],
["BLR","BELARUS"],
["BEL","BELGIUM"],
["BLZ","BELIZE"],
["BEN","BENIN"],
["BMU","BERMUDA"],
["BTN","BHUTAN"],
["BOL","BOLIVIA"],
["BIH","BOSNIA AND HERZ"],
["BWA","BOTSWANA"],
["BVT","BOUVET ISLAND"],
["BRA","BRAZIL"],
["IOT","BRITISH INDIAN "],
["BRN","BRUNEI DARUSSAL"],
["BGR","BULGARIA"],
["BFA","BURKINA FASO"],
["BDI","BURUNDI"],
["KHM","CAMBODIA"],
["CMR","CAMEROON"],
["CAN","CANADA"],
["CPV","CAPE VERDE"],
["CYM","CAYMAN ISLANDS"],
["CAF","CENTRAL AFRICAN"],
["TCD","CHAD"],
["CHL","CHILE"],
["CHN","CHINA"],
["CXR","CHRISTMAS ISLAN"],
["CCK","COCOS (KEELING)"],
["COL","COLOMBIA"],
["COM","COMOROS"],
["COG","CONGO"],
["COK","COOK ISLANDS"],
["CRI","COSTA RICA"],
["CIV","COTE D'IVOIRE"],
["HRV","CROATIA (local "],
["CUB","CUBA"],
["CYP","CYPRUS"],
["CZE","CZECH REPUBLIC"],
["DNK","DENMARK"],
["DJI","DJIBOUTI"],
["DMA","DOMINICA"],
["DOM","DOMINICAN REPUB"],
["TMP","EAST TIMOR"],
["ECU","ECUADOR"],
["EGY","EGYPT"],
["SLV","EL SALVADOR"],
["GNQ","EQUATORIAL GUIN"],
["ERI","ERITREA"],
["EST","ESTONIA"],
["ETH","ETHIOPIA"],
["FLK","FALKLAND ISLAND"],
["FRO","FAROE ISLANDS"],
["FJI","FIJI"],
["FIN","FINLAND"],
["FRA","FRANCE"],
["FXX","FRANCE, METROPO"],
["GUF","FRENCH GUIANA"],
["PYF","FRENCH POLYNESI"],
["ATF","FRENCH SOUTHERN"],
["GAB","GABON"],
["GMB","GAMBIA"],
["GEO","GEORGIA"],
["DEU","GERMANY"],
["GHA","GHANA"],
["GIB","GIBRALTAR"],
["GRC","GREECE"],
["GRL","GREENLAND"],
["GRD","GRENADA"],
["GLP","GUADELOUPE"],
["GUM","GUAM"],
["GTM","GUATEMALA"],
["GIN","GUINEA"],
["GNB","GUINEA-BISSAU"],
["GUY","GUYANA"],
["HTI","HAITI"],
["HMD","HEARD AND MC DO"],
["HND","HONDURAS"],
["HKG","HONG KONG"],
["HUN","HUNGARY"],
["ISL","ICELAND"],
["IND","INDIA"],
["IDN","INDONESIA"],
["IRN","IRAN (ISLAMIC R"],
["IRQ","IRAQ"],
["IRL","IRELAND"],
["ISR","ISRAEL"],
["ITA","ITALY"],
["JAM","JAMAICA"],
["JPN","JAPAN"],
["JOR","JORDAN"],
["KAZ","KAZAKHSTAN"],
["KEN","KENYA"],
["KIR","KIRIBATI"],
["PRK","KOREA, DEMOCRAT"],
["KOR","KOREA, REPUBLIC"],
["KWT","KUWAIT"],
["KGZ","KYRGYZSTAN"],
["LAO","LAO PEOPLE'S DE"],
["LVA","LATVIA"],
["LBN","LEBANON"],
["LSO","LESOTHO"],
["LBR","LIBERIA"],
["LBY","LIBYAN ARAB JAM"],
["LIE","LIECHTENSTEIN"],
["LTU","LITHUANIA"],
["LUX","LUXEMBOURG"],
["MAC","MACAU"],
["MKD","MACEDONIA, THE "],
["MDG","MADAGASCAR"],
["MWI","MALAWI"],
["MYS","MALAYSIA"],
["MDV","MALDIVES"],
["MLI","MALI"],
["MLT","MALTA"],
["MHL","MARSHALL ISLAND"],
["MTQ","MARTINIQUE"],
["MRT","MAURITANIA"],
["MUS","MAURITIUS"],
["MYT","MAYOTTE"],
["MEX","MEXICO"],
["FSM","MICRONESIA, FED"],
["MDA","MOLDOVA, REPUBL"],
["MCO","MONACO"],
["MNG","MONGOLIA"],
["MSR","MONTSERRAT"],
["MAR","MOROCCO"],
["MOZ","MOZAMBIQUE"],
["MMR","MYANMAR"],
["NAM","NAMIBIA"],
["NRU","NAURU"],
["NPL","NEPAL"],
["NLD","NETHERLANDS"],
["ANT","NETHERLANDS ANT"],
["NCL","NEW CALEDONIA"],
["NZL","NEW ZEALAND"],
["NIC","NICARAGUA"],
["NER","NIGER"],
["NGA","NIGERIA"],
["NIU","NIUE"],
["NFK","NORFOLK ISLAND"],
["MNP","NORTHERN MARIAN"],
["NOR","NORWAY"],
["OMN","OMAN"],
["PAK","PAKISTAN"],
["PLW","PALAU"],
["PAN","PANAMA"],
["PNG","PAPUA NEW GUINE"],
["PRY","PARAGUAY"],
["PER","PERU"],
["PHL","PHILIPPINES"],
["PCN","PITCAIRN"],
["POL","POLAND"],
["PRT","PORTUGAL"],
["PRI","PUERTO RICO"],
["QAT","QATAR"],
["REU","REUNION"],
["ROM","ROMANIA"],
["RUS","RUSSIAN FEDERAT"],
["RWA","RWANDA"],
["KNA","SAINT KITTS AND"],
["LCA","SAINT LUCIA"],
["VCT","SAINT VINCENT A"],
["WSM","SAMOA"],
["SMR","SAN MARINO"],
["STP","SAO TOME AND PR"],
["SAU","SAUDI ARABIA"],
["SEN","SENEGAL"],
["SYC","SEYCHELLES"],
["SLE","SIERRA LEONE"],
["SGP","SINGAPORE"],
["SVK","SLOVAKIA (Slova"],
["SVN","SLOVENIA"],
["SLB","SOLOMON ISLANDS"],
["SOM","SOMALIA"],
["ZAF","SOUTH AFRICA"],
["SGS","SOUTH GEORGIA A"],
["ESP","SPAIN"],
["LKA","SRI LANKA"],
["SHN","ST. HELENA"],
["SPM","ST. PIERRE AND "],
["SDN","SUDAN"],
["SUR","SURINAME"],
["SJM","SVALBARD AND JA"],
["SWZ","SWAZILAND"],
["SWE","SWEDEN"],
["CHE","SWITZERLAND"],
["SYR","SYRIAN ARAB REP"],
["TWN","TAIWAN, PROVINC"],
["TJK","TAJIKISTAN"],
["TZA","TANZANIA, UNITE"],
["THA","THAILAND"],
["TGO","TOGO"],
["TKL","TOKELAU"],
["TON","TONGA"],
["TTO","TRINIDAD AND TO"],
["TUN","TUNISIA"],
["TUR","TURKEY"],
["TKM","TURKMENISTAN"],
["TCA","TURKS AND CAICO"],
["TUV","TUVALU"],
["UGA","UGANDA"],
["UKR","UKRAINE"],
["ARE","UNITED ARAB EMI"],
["GBR","UNITED KINGDOM"],
["USA","UNITED STATES"],
["UMI","UNITED STATES M"],
["URY","URUGUAY"],
["UZB","UZBEKISTAN"],
["VUT","VANUATU"],
["VAT","VATICAN CITY ST"],
["VEN","VENEZUELA"],
["VNM","VIET NAM"],
["VGB","VIRGIN ISLANDS "],
["VIR","VIRGIN ISLANDS "],
["WLF","WALLIS AND FUTU"],
["ESH","WESTERN SAHARA"],
["YEM","YEMEN"],
["YUG","YUGOSLAVIA"],
["ZAR","ZAIRE"],
["ZMB","ZAMBIA"],
["ZWE","ZIMBABWE"]
]

jarrednicholls
3 Aug 2010, 9:59 AM
Hi Artisan,

It "looks" like it's working alright for me. Are you running 1.0.2.11?



/*
* File: MyStore.js
* Date: Tue Aug 03 2010 13:57:57 GMT-0400 (EDT)
*
* This file was generated by Ext Designer version xds-1.0.2.11.
* http://www.extjs.com/products/designer/
*
* This file will be auto-generated each and everytime you export.
*
* Do NOT hand edit this file.
*/

MyStore = Ext.extend(Ext.data.ArrayStore, {
constructor: function(cfg) {
cfg = cfg || {};
MyStore.superclass.constructor.call(this, Ext.apply({
storeId: 'MyStore',
data: [
[
"",
"N/A"
],
[
"ALB",
"ALBANIA"
],
[
"DZA",
"ALGERIA"
],
[
"ASM",
"AMERICAN SAMOA"
],
[
"AND",
"ANDORRA"
],
[
"AGO",
"ANGOLA"
],
[
"AIA",
"ANGUILLA"
],
[
"ATA",
"ANTARCTICA"
],
[
"ATG",
"ANTIGUA AND BAR"
],
[
"ARG",
"ARGENTINA"
],
[
"ARM",
"ARMENIA"
],
[
"ABW",
"ARUBA"
],
[
"AUS",
"AUSTRALIA"
],
[
"AUT",
"AUSTRIA"
],
[
"AZE",
"AZERBAIJAN"
],
[
"BHS",
"BAHAMAS"
],
[
"BHR",
"BAHRAIN"
],
[
"BGD",
"BANGLADESH"
],
[
"BRB",
"BARBADOS"
],
[
"BLR",
"BELARUS"
],
[
"BEL",
"BELGIUM"
],
[
"BLZ",
"BELIZE"
],
[
"BEN",
"BENIN"
],
[
"BMU",
"BERMUDA"
],
[
"BTN",
"BHUTAN"
],
[
"BOL",
"BOLIVIA"
],
[
"BIH",
"BOSNIA AND HERZ"
],
[
"BWA",
"BOTSWANA"
],
[
"BVT",
"BOUVET ISLAND"
],
[
"BRA",
"BRAZIL"
],
[
"IOT",
"BRITISH INDIAN "
],
[
"BRN",
"BRUNEI DARUSSAL"
],
[
"BGR",
"BULGARIA"
],
[
"BFA",
"BURKINA FASO"
],
[
"BDI",
"BURUNDI"
],
[
"KHM",
"CAMBODIA"
],
[
"CMR",
"CAMEROON"
],
[
"CAN",
"CANADA"
],
[
"CPV",
"CAPE VERDE"
],
[
"CYM",
"CAYMAN ISLANDS"
],
[
"CAF",
"CENTRAL AFRICAN"
],
[
"TCD",
"CHAD"
],
[
"CHL",
"CHILE"
],
[
"CHN",
"CHINA"
],
[
"CXR",
"CHRISTMAS ISLAN"
],
[
"CCK",
"COCOS (KEELING)"
],
[
"COL",
"COLOMBIA"
],
[
"COM",
"COMOROS"
],
[
"COG",
"CONGO"
],
[
"COK",
"COOK ISLANDS"
],
[
"CRI",
"COSTA RICA"
],
[
"CIV",
"COTE D'IVOIRE"
],
[
"HRV",
"CROATIA (local "
],
[
"CUB",
"CUBA"
],
[
"CYP",
"CYPRUS"
],
[
"CZE",
"CZECH REPUBLIC"
],
[
"DNK",
"DENMARK"
],
[
"DJI",
"DJIBOUTI"
],
[
"DMA",
"DOMINICA"
],
[
"DOM",
"DOMINICAN REPUB"
],
[
"TMP",
"EAST TIMOR"
],
[
"ECU",
"ECUADOR"
],
[
"EGY",
"EGYPT"
],
[
"SLV",
"EL SALVADOR"
],
[
"GNQ",
"EQUATORIAL GUIN"
],
[
"ERI",
"ERITREA"
],
[
"EST",
"ESTONIA"
],
[
"ETH",
"ETHIOPIA"
],
[
"FLK",
"FALKLAND ISLAND"
],
[
"FRO",
"FAROE ISLANDS"
],
[
"FJI",
"FIJI"
],
[
"FIN",
"FINLAND"
],
[
"FRA",
"FRANCE"
],
[
"FXX",
"FRANCE, METROPO"
],
[
"GUF",
"FRENCH GUIANA"
],
[
"PYF",
"FRENCH POLYNESI"
],
[
"ATF",
"FRENCH SOUTHERN"
],
[
"GAB",
"GABON"
],
[
"GMB",
"GAMBIA"
],
[
"GEO",
"GEORGIA"
],
[
"DEU",
"GERMANY"
],
[
"GHA",
"GHANA"
],
[
"GIB",
"GIBRALTAR"
],
[
"GRC",
"GREECE"
],
[
"GRL",
"GREENLAND"
],
[
"GRD",
"GRENADA"
],
[
"GLP",
"GUADELOUPE"
],
[
"GUM",
"GUAM"
],
[
"GTM",
"GUATEMALA"
],
[
"GIN",
"GUINEA"
],
[
"GNB",
"GUINEA-BISSAU"
],
[
"GUY",
"GUYANA"
],
[
"HTI",
"HAITI"
],
[
"HMD",
"HEARD AND MC DO"
],
[
"HND",
"HONDURAS"
],
[
"HKG",
"HONG KONG"
],
[
"HUN",
"HUNGARY"
],
[
"ISL",
"ICELAND"
],
[
"IND",
"INDIA"
],
[
"IDN",
"INDONESIA"
],
[
"IRN",
"IRAN (ISLAMIC R"
],
[
"IRQ",
"IRAQ"
],
[
"IRL",
"IRELAND"
],
[
"ISR",
"ISRAEL"
],
[
"ITA",
"ITALY"
],
[
"JAM",
"JAMAICA"
],
[
"JPN",
"JAPAN"
],
[
"JOR",
"JORDAN"
],
[
"KAZ",
"KAZAKHSTAN"
],
[
"KEN",
"KENYA"
],
[
"KIR",
"KIRIBATI"
],
[
"PRK",
"KOREA, DEMOCRAT"
],
[
"KOR",
"KOREA, REPUBLIC"
],
[
"KWT",
"KUWAIT"
],
[
"KGZ",
"KYRGYZSTAN"
],
[
"LAO",
"LAO PEOPLE'S DE"
],
[
"LVA",
"LATVIA"
],
[
"LBN",
"LEBANON"
],
[
"LSO",
"LESOTHO"
],
[
"LBR",
"LIBERIA"
],
[
"LBY",
"LIBYAN ARAB JAM"
],
[
"LIE",
"LIECHTENSTEIN"
],
[
"LTU",
"LITHUANIA"
],
[
"LUX",
"LUXEMBOURG"
],
[
"MAC",
"MACAU"
],
[
"MKD",
"MACEDONIA, THE "
],
[
"MDG",
"MADAGASCAR"
],
[
"MWI",
"MALAWI"
],
[
"MYS",
"MALAYSIA"
],
[
"MDV",
"MALDIVES"
],
[
"MLI",
"MALI"
],
[
"MLT",
"MALTA"
],
[
"MHL",
"MARSHALL ISLAND"
],
[
"MTQ",
"MARTINIQUE"
],
[
"MRT",
"MAURITANIA"
],
[
"MUS",
"MAURITIUS"
],
[
"MYT",
"MAYOTTE"
],
[
"MEX",
"MEXICO"
],
[
"FSM",
"MICRONESIA, FED"
],
[
"MDA",
"MOLDOVA, REPUBL"
],
[
"MCO",
"MONACO"
],
[
"MNG",
"MONGOLIA"
],
[
"MSR",
"MONTSERRAT"
],
[
"MAR",
"MOROCCO"
],
[
"MOZ",
"MOZAMBIQUE"
],
[
"MMR",
"MYANMAR"
],
[
"NAM",
"NAMIBIA"
],
[
"NRU",
"NAURU"
],
[
"NPL",
"NEPAL"
],
[
"NLD",
"NETHERLANDS"
],
[
"ANT",
"NETHERLANDS ANT"
],
[
"NCL",
"NEW CALEDONIA"
],
[
"NZL",
"NEW ZEALAND"
],
[
"NIC",
"NICARAGUA"
],
[
"NER",
"NIGER"
],
[
"NGA",
"NIGERIA"
],
[
"NIU",
"NIUE"
],
[
"NFK",
"NORFOLK ISLAND"
],
[
"MNP",
"NORTHERN MARIAN"
],
[
"NOR",
"NORWAY"
],
[
"OMN",
"OMAN"
],
[
"PAK",
"PAKISTAN"
],
[
"PLW",
"PALAU"
],
[
"PAN",
"PANAMA"
],
[
"PNG",
"PAPUA NEW GUINE"
],
[
"PRY",
"PARAGUAY"
],
[
"PER",
"PERU"
],
[
"PHL",
"PHILIPPINES"
],
[
"PCN",
"PITCAIRN"
],
[
"POL",
"POLAND"
],
[
"PRT",
"PORTUGAL"
],
[
"PRI",
"PUERTO RICO"
],
[
"QAT",
"QATAR"
],
[
"REU",
"REUNION"
],
[
"ROM",
"ROMANIA"
],
[
"RUS",
"RUSSIAN FEDERAT"
],
[
"RWA",
"RWANDA"
],
[
"KNA",
"SAINT KITTS AND"
],
[
"LCA",
"SAINT LUCIA"
],
[
"VCT",
"SAINT VINCENT A"
],
[
"WSM",
"SAMOA"
],
[
"SMR",
"SAN MARINO"
],
[
"STP",
"SAO TOME AND PR"
],
[
"SAU",
"SAUDI ARABIA"
],
[
"SEN",
"SENEGAL"
],
[
"SYC",
"SEYCHELLES"
],
[
"SLE",
"SIERRA LEONE"
],
[
"SGP",
"SINGAPORE"
],
[
"SVK",
"SLOVAKIA (Slova"
],
[
"SVN",
"SLOVENIA"
],
[
"SLB",
"SOLOMON ISLANDS"
],
[
"SOM",
"SOMALIA"
],
[
"ZAF",
"SOUTH AFRICA"
],
[
"SGS",
"SOUTH GEORGIA A"
],
[
"ESP",
"SPAIN"
],
[
"LKA",
"SRI LANKA"
],
[
"SHN",
"ST. HELENA"
],
[
"SPM",
"ST. PIERRE AND "
],
[
"SDN",
"SUDAN"
],
[
"SUR",
"SURINAME"
],
[
"SJM",
"SVALBARD AND JA"
],
[
"SWZ",
"SWAZILAND"
],
[
"SWE",
"SWEDEN"
],
[
"CHE",
"SWITZERLAND"
],
[
"SYR",
"SYRIAN ARAB REP"
],
[
"TWN",
"TAIWAN, PROVINC"
],
[
"TJK",
"TAJIKISTAN"
],
[
"TZA",
"TANZANIA, UNITE"
],
[
"THA",
"THAILAND"
],
[
"TGO",
"TOGO"
],
[
"TKL",
"TOKELAU"
],
[
"TON",
"TONGA"
],
[
"TTO",
"TRINIDAD AND TO"
],
[
"TUN",
"TUNISIA"
],
[
"TUR",
"TURKEY"
],
[
"TKM",
"TURKMENISTAN"
],
[
"TCA",
"TURKS AND CAICO"
],
[
"TUV",
"TUVALU"
],
[
"UGA",
"UGANDA"
],
[
"UKR",
"UKRAINE"
],
[
"ARE",
"UNITED ARAB EMI"
],
[
"GBR",
"UNITED KINGDOM"
],
[
"USA",
"UNITED STATES"
],
[
"UMI",
"UNITED STATES M"
],
[
"URY",
"URUGUAY"
],
[
"UZB",
"UZBEKISTAN"
],
[
"VUT",
"VANUATU"
],
[
"VAT",
"VATICAN CITY ST"
],
[
"VEN",
"VENEZUELA"
],
[
"VNM",
"VIET NAM"
],
[
"VGB",
"VIRGIN ISLANDS "
],
[
"VIR",
"VIRGIN ISLANDS "
],
[
"WLF",
"WALLIS AND FUTU"
],
[
"ESH",
"WESTERN SAHARA"
],
[
"YEM",
"YEMEN"
],
[
"YUG",
"YUGOSLAVIA"
],
[
"ZAR",
"ZAIRE"
],
[
"ZMB",
"ZAMBIA"
],
[
"ZWE",
"ZIMBABWE"
]
],
fields: [
{
name: 'code'
},
{
name: 'name'
}
]
}, cfg));
}
});
new MyStore();

Artistan
3 Aug 2010, 11:33 AM
sorry, forgot version.
1.0.2.6, will check again

Artistan
3 Aug 2010, 11:38 AM
works now, thanks

jarrednicholls
3 Aug 2010, 6:26 PM
Ok great. Yeah there was a fix in 1.0.2.8: Object/Array config editors will now properly escape double-quotes with string literal entries Which universally fixed all quote escaping issues in the code generation for Object/Array config options.