Bug #2344

settings.createMultiOpt can't handle array as input (api v1 duktape)

Added by Leonid Protasov over 6 years ago. Updated over 6 years ago.

Status:InvalidStart date:11/06/2014
Priority:NormalDue date:
Assignee:Andreas Smas% Done:

0%

Category:API
Target version:4.8
Found in version:Latest BE Platform:Linux

Description

Try on rad.io plugin:

The code that works ok in spidermonkey
data var is json plugin gets with :

Afghanistan,Albania,Algeria,Angola,Antilles,Argentina,Armenia,Australia,Austria,Azerbaijan,Belarus,Belgium,Bolivia,Bosnia and Herzegovina,Brazil,Brunei,Bulgaria,Burkina Faso,Burundi,Cameroon,Canada,Cape Verde,Chile,China,Colombia,Congo,Costa Rica,Croatia,Cyprus,Czech Republic,Denmark,Dominican Republic,East Timor,Ecuador,Egypt,El Salvador,Estonia,Faeroe Islands,Finland,France,Georgia,Germany,Ghana,Gibraltar,Great Britain,Greece,Grenada,Guatemala,Guinea,Guyana,Haiti,Honduras,Hungary,Iceland,India,Indonesia,Iran,Iraq,Ireland,Israel,Italy,Ivory Coast,Jamaica,Japan,Jordan,Kenia,Kosovo,Laos,Latvia,Lebanon,Libya,Liechtenstein,Lithuania,Luxembourg,Macedonia,Madagascar,Malawi,Malaysia,Mali,Malta,Mauritius,Mexico,Moldova,Monaco,Montenegro,Morocco,Mozambique,Namibia,Nepal,Netherlands,New Zealand,Nicaragua,Nigeria,Norway,Oman,Pakistan,Palestinian territories,Panama,Papua New Guinea,Paraguay,Peru,Philippines,Poland,Portugal,Puerto Rico,Republic of Guinea-Bissau,Romania,Russia,Rwanda,Saint Lucia,Saudi Arabia,Serbia,Singapore,Slovakia,Slovenia,South Africa,South Korea,Spain,Sri Lanka,Sweden,Switzerland,Taiwan,Tanzania,Thailand,Togo,Trinidad and Tobago,Tunisia,Turkey,Uganda,Ukraine,United Arab Emirates,Uruguay,USA,Venezuela

The code:

    // populate countries
    var data = get_data("menu/valuesofcategory", {'category':'_country'});
    var options = [];
    for (var i in data)
    options.push([data[i], data[i]]);
showtime.print(data);
    settings.createMultiOpt("country", "Country for the nearest stations", options, function(v) {
    service.country = v;
    });

If you go to settings - it's empty.


Related issues

Related to Bug #2424: The array list created via settings.createMultiOpt in ecm... Fixed 12/21/2014

Associated revisions

Revision 6b4ca080
Added by Andreas Smas over 6 years ago

ecmascript: Add dump() to settings groups

refs #2344

Change included in version 4.7.468

Revision 2e6271fc
Added by Andreas Smas over 6 years ago

ecmascript/settings/multiopt: Make sure option id is a string

refs #2344

Change included in version 4.7.494

History

#1 Updated by Andreas Smas over 6 years ago

  • Status changed from New to Need feedback

This works fine for me:

var settings = require('showtime/settings');

var s = new settings.globalSettings('blah', 'foo');

options = [];

options.push(['a', 'alpha']);
options.push(['b', 'beta']);

s.createMultiOpt('test', 'multiopt', options, function(x) {
  console.log(x);
});

can you please add:

print(JSON.stringify(data));
print(JSON.stringify(options));

before createMultiOpt()

so I can see what's in the objects.

#2 Updated by Leonid Protasov over 6 years ago

["Afghanistan","Albania","Algeria","Angola","Antilles","Argentina","Armenia","Australia","Austria","Azerbaijan","Belarus","Belgium","Bolivia","Bosnia and Herzegovina","Brazil","Brunei","Bulgaria","Burkina Faso","Burundi","Cameroon","Canada","Cape Verde","Chile","China","Colombia","Congo","Costa Rica","Croatia","Cyprus","Czech Republic","Denmark","Dominican Republic","East Timor","Ecuador","Egypt","El Salvador","Estonia","Faeroe Islands","Finland","France","Georgia","Germany","Ghana","Gibraltar","Great Britain","Greece","Grenada","Guatemala","Guinea","Guyana","Haiti","Honduras","Hungary","Iceland","India","Indonesia","Iran","Iraq","Ireland","Israel","Italy","Ivory Coast","Jamaica","Japan","Jordan","Kenia","Kosovo","Laos","Latvia","Lebanon","Libya","Liechtenstein","Lithuania","Luxembourg","Macedonia","Madagascar","Malawi","Malaysia","Mali","Malta","Mauritius","Mexico","Moldova","Monaco","Montenegro","Morocco","Mozambique","Namibia","Nepal","Netherlands","New Zealand","Nicaragua","Nigeria","Norway","Oman","Pakistan","Palestinian territories","Panama","Papua New Guinea","Paraguay","Peru","Philippines","Poland","Portugal","Puerto Rico","Republic of Guinea-Bissau","Romania","Russia","Rwanda","Saint Lucia","Saudi Arabia","Serbia","Singapore","Slovakia","Slovenia","South Africa","South Korea","Spain","Sri Lanka","Sweden","Switzerland","Taiwan","Tanzania","Thailand","Togo","Trinidad and Tobago","Tunisia","Turkey","Uganda","Ukraine","United Arab Emirates","Uruguay","USA","Venezuela"]
[["Afghanistan","Afghanistan"],["Albania","Albania"],["Algeria","Algeria"],["Angola","Angola"],["Antilles","Antilles"],["Argentina","Argentina"],["Armenia","Armenia"],["Australia","Australia"],["Austria","Austria"],["Azerbaijan","Azerbaijan"],["Belarus","Belarus"],["Belgium","Belgium"],["Bolivia","Bolivia"],["Bosnia and Herzegovina","Bosnia and Herzegovina"],["Brazil","Brazil"],["Brunei","Brunei"],["Bulgaria","Bulgaria"],["Burkina Faso","Burkina Faso"],["Burundi","Burundi"],["Cameroon","Cameroon"],["Canada","Canada"],["Cape Verde","Cape Verde"],["Chile","Chile"],["China","China"],["Colombia","Colombia"],["Congo","Congo"],["Costa Rica","Costa Rica"],["Croatia","Croatia"],["Cyprus","Cyprus"],["Czech Republic","Czech Republic"],["Denmark","Denmark"],["Dominican Republic","Dominican Republic"],["East Timor","East Timor"],["Ecuador","Ecuador"],["Egypt","Egypt"],["El Salvador","El Salvador"],["Estonia","Estonia"],["Faeroe Islands","Faeroe Islands"],["Finland","Finland"],["France","France"],["Georgia","Georgia"],["Germany","Germany"],["Ghana","Ghana"],["Gibraltar","Gibraltar"],["Great Britain","Great Britain"],["Greece","Greece"],["Grenada","Grenada"],["Guatemala","Guatemala"],["Guinea","Guinea"],["Guyana","Guyana"],["Haiti","Haiti"],["Honduras","Honduras"],["Hungary","Hungary"],["Iceland","Iceland"],["India","India"],["Indonesia","Indonesia"],["Iran","Iran"],["Iraq","Iraq"],["Ireland","Ireland"],["Israel","Israel"],["Italy","Italy"],["Ivory Coast","Ivory Coast"],["Jamaica","Jamaica"],["Japan","Japan"],["Jordan","Jordan"],["Kenia","Kenia"],["Kosovo","Kosovo"],["Laos","Laos"],["Latvia","Latvia"],["Lebanon","Lebanon"],["Libya","Libya"],["Liechtenstein","Liechtenstein"],["Lithuania","Lithuania"],["Luxembourg","Luxembourg"],["Macedonia","Macedonia"],["Madagascar","Madagascar"],["Malawi","Malawi"],["Malaysia","Malaysia"],["Mali","Mali"],["Malta","Malta"],["Mauritius","Mauritius"],["Mexico","Mexico"],["Moldova","Moldova"],["Monaco","Monaco"],["Montenegro","Montenegro"],["Morocco","Morocco"],["Mozambique","Mozambique"],["Namibia","Namibia"],["Nepal","Nepal"],["Netherlands","Netherlands"],["New Zealand","New Zealand"],["Nicaragua","Nicaragua"],["Nigeria","Nigeria"],["Norway","Norway"],["Oman","Oman"],["Pakistan","Pakistan"],["Palestinian territories","Palestinian territories"],["Panama","Panama"],["Papua New Guinea","Papua New Guinea"],["Paraguay","Paraguay"],["Peru","Peru"],["Philippines","Philippines"],["Poland","Poland"],["Portugal","Portugal"],["Puerto Rico","Puerto Rico"],["Republic of Guinea-Bissau","Republic of Guinea-Bissau"],["Romania","Romania"],["Russia","Russia"],["Rwanda","Rwanda"],["Saint Lucia","Saint Lucia"],["Saudi Arabia","Saudi Arabia"],["Serbia","Serbia"],["Singapore","Singapore"],["Slovakia","Slovakia"],["Slovenia","Slovenia"],["South Africa","South Africa"],["South Korea","South Korea"],["Spain","Spain"],["Sri Lanka","Sri Lanka"],["Sweden","Sweden"],["Switzerland","Switzerland"],["Taiwan","Taiwan"],["Tanzania","Tanzania"],["Thailand","Thailand"],["Togo","Togo"],["Trinidad and Tobago","Trinidad and Tobago"],["Tunisia","Tunisia"],["Turkey","Turkey"],["Uganda","Uganda"],["Ukraine","Ukraine"],["United Arab Emirates","United Arab Emirates"],["Uruguay","Uruguay"],["USA","USA"],["Venezuela","Venezuela"]]

Multiopt in settings is empty...

#3 Updated by Andreas Smas over 6 years ago

Can you try to dump the model from the settings group:

Sett settings.dump() like this patch and paste the output

diff --git a/rad.io/rad.io.js b/rad.io/rad.io.js
index c52eeb6..37520ef 100644
--- a/rad.io/rad.io.js
+++ b/rad.io/rad.io.js
@@ -70,6 +70,8 @@
         showtime.notify('Favorites has been cleaned successfully', 2);
     });

+    settings.dump();
+
     var cp1252 = 'ÀÁÂÃÄŨÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕ×ÖØÙÜÚÛÝÞßàáâãäå¸æçèéêëìíîïðñòóôõ÷öøùüúûýþÿ³²ºª¿¯´¥';
     var cp1251 = 'АБВГДЕЁЖЗИЙКЛМНОПРСТУФХЧЦШЩЬЪЫЭЮЯабвгдеёжзийклмнопрстуфхчцшщьъыэюяіІєЄїЇґҐ';
     function fixMB(s) {
@@ -306,4 +308,4 @@
         loader();
         page.paginator = loader;
     });

#4 Updated by Leonid Protasov over 6 years ago

Andreas Öman wrote:

Can you try to dump the model from the settings group:

Sett settings.dump() like this patch and paste the output

[...]

Sure:

nodes[0x7f17f8108420 2 1   ]: <directory>
    country[0x7f17f81052a0 2 1   ]: <directory>
        type[0x7f17f8105210 1 1   ]: "multiopt" 
        enabled[0x7f17f8105180 1 1   ]: 1
        metadata[0x7f17f81050f0 1 1   ]: <directory>
            title[0x7f17f8105060 1 1   ]: "Country for the nearest stations" 
        options[0x7f17f8104fd0 1 1   ]: <directory>
            Afghanistan[0x7f17f8104f40 1 1   ]: <directory>
                title[0x7f17f8104eb0 1 1   ]: "Afghanistan" 
            Albania[0x7f17f8104e20 1 1   ]: <directory>
                title[0x7f17f8104d90 1 1   ]: "Albania" 
            Algeria[0x7f17f8104d00 1 1   ]: <directory>
                title[0x7f17f8104c70 1 1   ]: "Algeria" 
            Angola[0x7f17f8104be0 1 1   ]: <directory>
                title[0x7f17f8104b50 1 1   ]: "Angola" 
            Antilles[0x7f17f8104ac0 1 1   ]: <directory>
                title[0x7f17f8104a30 1 1   ]: "Antilles" 
            Argentina[0x7f17f81049a0 1 1   ]: <directory>
                title[0x7f17f8104910 1 1   ]: "Argentina" 
            Armenia[0x7f17f8104880 1 1   ]: <directory>
                title[0x7f17f81047f0 1 1   ]: "Armenia" 
            Australia[0x7f17f8104760 1 1   ]: <directory>
                title[0x7f17f81046d0 1 1   ]: "Australia" 
            Austria[0x7f17f8104640 1 1   ]: <directory>
                title[0x7f17f81045b0 1 1   ]: "Austria" 
            Azerbaijan[0x7f17f8104520 1 1   ]: <directory>
                title[0x7f17f8104490 1 1   ]: "Azerbaijan" 
            Belarus[0x7f17f8104400 1 1   ]: <directory>
                title[0x7f17f8104370 1 1   ]: "Belarus" 
            Belgium[0x7f17f81042e0 1 1   ]: <directory>
                title[0x7f17f8104250 1 1   ]: "Belgium" 
            Bolivia[0x7f17f81041c0 1 1   ]: <directory>
                title[0x7f17f8104130 1 1   ]: "Bolivia" 
            Bosnia and Herzegovina[0x7f17f81040a0 1 1   ]: <directory>
                title[0x7f17f8104010 1 1   ]: "Bosnia and Herzegovina" 
            Brazil[0x7f17f8103f80 1 1   ]: <directory>
                title[0x7f17f8103ef0 1 1   ]: "Brazil" 
            Brunei[0x7f17f8103e60 1 1   ]: <directory>
                title[0x7f17f8103dd0 1 1   ]: "Brunei" 
            Bulgaria[0x7f17f8103d40 1 1   ]: <directory>
                title[0x7f17f8103cb0 1 1   ]: "Bulgaria" 
            Burkina Faso[0x7f17f8103c20 1 1   ]: <directory>
                title[0x7f17f8103b90 1 1   ]: "Burkina Faso" 
            Burundi[0x7f17f8103b00 1 1   ]: <directory>
                title[0x7f17f8103a70 1 1   ]: "Burundi" 
            Cameroon[0x7f17f81039e0 1 1   ]: <directory>
                title[0x7f17f8103950 1 1   ]: "Cameroon" 
            Canada[0x7f17f81038c0 1 1   ]: <directory>
                title[0x7f17f8103830 1 1   ]: "Canada" 
            Cape Verde[0x7f17f81037a0 1 1   ]: <directory>
                title[0x7f17f8103710 1 1   ]: "Cape Verde" 
            Chile[0x7f17f8103680 1 1   ]: <directory>
                title[0x7f17f81035f0 1 1   ]: "Chile" 
            China[0x7f17f8103560 1 1   ]: <directory>
                title[0x7f17f81034d0 1 1   ]: "China" 
            Colombia[0x7f17f8103440 1 1   ]: <directory>
                title[0x7f17f81033b0 1 1   ]: "Colombia" 
            Congo[0x7f17f8103320 1 1   ]: <directory>
                title[0x7f17f8103290 1 1   ]: "Congo" 
            Costa Rica[0x7f17f8103200 1 1   ]: <directory>
                title[0x7f17f8103170 1 1   ]: "Costa Rica" 
            Croatia[0x7f17f81030e0 1 1   ]: <directory>
                title[0x7f17f8103050 1 1   ]: "Croatia" 
            Cyprus[0x7f17f8102fc0 1 1   ]: <directory>
                title[0x7f17f8102f30 1 1   ]: "Cyprus" 
            Czech Republic[0x7f17f8102ea0 1 1   ]: <directory>
                title[0x7f17f8102e10 1 1   ]: "Czech Republic" 
            Denmark[0x7f17f8102d80 1 1   ]: <directory>
                title[0x7f17f8102cf0 1 1   ]: "Denmark" 
            Dominican Republic[0x7f17f8102c60 1 1   ]: <directory>
                title[0x7f17f8102bd0 1 1   ]: "Dominican Republic" 
            East Timor[0x7f17f8102b40 1 1   ]: <directory>
                title[0x7f17f8102ab0 1 1   ]: "East Timor" 
            Ecuador[0x7f17f8102a20 1 1   ]: <directory>
                title[0x7f17f8102990 1 1   ]: "Ecuador" 
            Egypt[0x7f17f8102900 1 1   ]: <directory>
                title[0x7f17f8102870 1 1   ]: "Egypt" 
            El Salvador[0x7f17f81027e0 1 1   ]: <directory>
                title[0x7f17f8102750 1 1   ]: "El Salvador" 
            Estonia[0x7f17f81026c0 1 1   ]: <directory>
                title[0x7f17f8102630 1 1   ]: "Estonia" 
            Faeroe Islands[0x7f17f81025a0 1 1   ]: <directory>
                title[0x7f17f8102510 1 1   ]: "Faeroe Islands" 
            Finland[0x7f17f8102480 1 1   ]: <directory>
                title[0x7f17f81023f0 1 1   ]: "Finland" 
            France[0x7f17f8102360 1 1   ]: <directory>
                title[0x7f17f81022d0 1 1   ]: "France" 
            Georgia[0x7f17f8102240 1 1   ]: <directory>
                title[0x7f17f81021b0 1 1   ]: "Georgia" 
            Germany[0x7f17f8102120 1 1   ]: <directory>
                title[0x7f17f8102090 1 1   ]: "Germany" 
            Ghana[0x7f17f8102000 1 1   ]: <directory>
                title[0x7f17f8100ed0 1 1   ]: "Ghana" 
            Gibraltar[0x7f17f8100e40 1 1   ]: <directory>
                title[0x7f17f8100db0 1 1   ]: "Gibraltar" 
            Great Britain[0x7f17f8100d20 1 1   ]: <directory>
                title[0x7f17f8100c90 1 1   ]: "Great Britain" 
            Greece[0x7f17f8100c00 1 1   ]: <directory>
                title[0x7f17f8100b70 1 1   ]: "Greece" 
            Grenada[0x7f17f8100ae0 1 1   ]: <directory>
                title[0x7f17f8100a50 1 1   ]: "Grenada" 
            Guatemala[0x7f17f81009c0 1 1   ]: <directory>
                title[0x7f17f8100930 1 1   ]: "Guatemala" 
            Guinea[0x7f17f81008a0 1 1   ]: <directory>
                title[0x7f17f8100810 1 1   ]: "Guinea" 
            Guyana[0x7f17f8100780 1 1   ]: <directory>
                title[0x7f17f81006f0 1 1   ]: "Guyana" 
            Haiti[0x7f17f8100660 1 1   ]: <directory>
                title[0x7f17f81005d0 1 1   ]: "Haiti" 
            Honduras[0x7f17f8100540 1 1   ]: <directory>
                title[0x7f17f81004b0 1 1   ]: "Honduras" 
            Hungary[0x7f17f8100420 1 1   ]: <directory>
                title[0x7f17f8100390 1 1   ]: "Hungary" 
            Iceland[0x7f17f8100300 1 1   ]: <directory>
                title[0x7f17f8100270 1 1   ]: "Iceland" 
            India[0x7f17f81001e0 1 1   ]: <directory>
                title[0x7f17f8100150 1 1   ]: "India" 
            Indonesia[0x7f17f81000c0 1 1   ]: <directory>
                title[0x7f17f8100030 1 1   ]: "Indonesia" 
            Iran[0x7f17f80fffa0 1 1   ]: <directory>
                title[0x7f17f80fff10 1 1   ]: "Iran" 
            Iraq[0x7f17f80ffe80 1 1   ]: <directory>
                title[0x7f17f80ffdf0 1 1   ]: "Iraq" 
            Ireland[0x7f17f80ffd60 1 1   ]: <directory>
                title[0x7f17f80ffcd0 1 1   ]: "Ireland" 
            Israel[0x7f17f80ffc40 1 1   ]: <directory>
                title[0x7f17f80ffbb0 1 1   ]: "Israel" 
            Italy[0x7f17f80ffb20 1 1   ]: <directory>
                title[0x7f17f80ffa90 1 1   ]: "Italy" 
            Ivory Coast[0x7f17f80ffa00 1 1   ]: <directory>
                title[0x7f17f80ff970 1 1   ]: "Ivory Coast" 
            Jamaica[0x7f17f80ff8e0 1 1   ]: <directory>
                title[0x7f17f80ff850 1 1   ]: "Jamaica" 
            Japan[0x7f17f80ff7c0 1 1   ]: <directory>
                title[0x7f17f80ff730 1 1   ]: "Japan" 
            Jordan[0x7f17f80ff6a0 1 1   ]: <directory>
                title[0x7f17f80ff610 1 1   ]: "Jordan" 
            Kenia[0x7f17f80ff580 1 1   ]: <directory>
                title[0x7f17f80ff4f0 1 1   ]: "Kenia" 
            Kosovo[0x7f17f80ff460 1 1   ]: <directory>
                title[0x7f17f80ff3d0 1 1   ]: "Kosovo" 
            Laos[0x7f17f80ff340 1 1   ]: <directory>
                title[0x7f17f80ff2b0 1 1   ]: "Laos" 
            Latvia[0x7f17f80ff220 1 1   ]: <directory>
                title[0x7f17f80ff190 1 1   ]: "Latvia" 
            Lebanon[0x7f17f80ff100 1 1   ]: <directory>
                title[0x7f17f80ff070 1 1   ]: "Lebanon" 
            Libya[0x7f17f80fefe0 1 1   ]: <directory>
                title[0x7f17f80fef50 1 1   ]: "Libya" 
            Liechtenstein[0x7f17f80feec0 1 1   ]: <directory>
                title[0x7f17f80fee30 1 1   ]: "Liechtenstein" 
            Lithuania[0x7f17f80feda0 1 1   ]: <directory>
                title[0x7f17f80fed10 1 1   ]: "Lithuania" 
            Luxembourg[0x7f17f80fec80 1 1   ]: <directory>
                title[0x7f17f80febf0 1 1   ]: "Luxembourg" 
            Macedonia[0x7f17f80feb60 1 1   ]: <directory>
                title[0x7f17f80fead0 1 1   ]: "Macedonia" 
            Madagascar[0x7f17f80fea40 1 1   ]: <directory>
                title[0x7f17f80fe9b0 1 1   ]: "Madagascar" 
            Malawi[0x7f17f80fe920 1 1   ]: <directory>
                title[0x7f17f80fe890 1 1   ]: "Malawi" 
            Malaysia[0x7f17f80fe800 1 1   ]: <directory>
                title[0x7f17f80fe770 1 1   ]: "Malaysia" 
            Mali[0x7f17f80fe6e0 1 1   ]: <directory>
                title[0x7f17f80fe650 1 1   ]: "Mali" 
            Malta[0x7f17f80fe5c0 1 1   ]: <directory>
                title[0x7f17f80fe530 1 1   ]: "Malta" 
            Mauritius[0x7f17f80fe4a0 1 1   ]: <directory>
                title[0x7f17f80fe410 1 1   ]: "Mauritius" 
            Mexico[0x7f17f80fe380 1 1   ]: <directory>
                title[0x7f17f80fe2f0 1 1   ]: "Mexico" 
            Moldova[0x7f17f80fe260 1 1   ]: <directory>
                title[0x7f17f80fe1d0 1 1   ]: "Moldova" 
            Monaco[0x7f17f80fe140 1 1   ]: <directory>
                title[0x7f17f80fe0b0 1 1   ]: "Monaco" 
            Montenegro[0x7f17f80fe020 1 1   ]: <directory>
                title[0x7f17f80fdf90 1 1   ]: "Montenegro" 
            Morocco[0x7f17f80fdf00 1 1   ]: <directory>
                title[0x7f17f80fde70 1 1   ]: "Morocco" 
            Mozambique[0x7f17f80fdde0 1 1   ]: <directory>
                title[0x7f17f80fdd50 1 1   ]: "Mozambique" 
            Namibia[0x7f17f80fdcc0 1 1   ]: <directory>
                title[0x7f17f80fdc30 1 1   ]: "Namibia" 
            Nepal[0x7f17f80fdba0 1 1   ]: <directory>
                title[0x7f17f80fdb10 1 1   ]: "Nepal" 
            Netherlands[0x7f17f80fda80 1 1   ]: <directory>
                title[0x7f17f80fd9f0 1 1   ]: "Netherlands" 
            New Zealand[0x7f17f80fd960 1 1   ]: <directory>
                title[0x7f17f80fd8d0 1 1   ]: "New Zealand" 
            Nicaragua[0x7f17f80fd840 1 1   ]: <directory>
                title[0x7f17f80fd7b0 1 1   ]: "Nicaragua" 
            Nigeria[0x7f17f80fd720 1 1   ]: <directory>
                title[0x7f17f80fd690 1 1   ]: "Nigeria" 
            Norway[0x7f17f80fd600 1 1   ]: <directory>
                title[0x7f17f80fd570 1 1   ]: "Norway" 
            Oman[0x7f17f80fd4e0 1 1   ]: <directory>
                title[0x7f17f80fd450 1 1   ]: "Oman" 
            Pakistan[0x7f17f80fd3c0 1 1   ]: <directory>
                title[0x7f17f80fd330 1 1   ]: "Pakistan" 
            Palestinian territories[0x7f17f80fd2a0 1 1   ]: <directory>
                title[0x7f17f80fd210 1 1   ]: "Palestinian territories" 
            Panama[0x7f17f80fd180 1 1   ]: <directory>
                title[0x7f17f80fd0f0 1 1   ]: "Panama" 
            Papua New Guinea[0x7f17f80fd060 1 1   ]: <directory>
                title[0x7f17f80fcfd0 1 1   ]: "Papua New Guinea" 
            Paraguay[0x7f17f80fcf40 1 1   ]: <directory>
                title[0x7f17f80fceb0 1 1   ]: "Paraguay" 
            Peru[0x7f17f80fce20 1 1   ]: <directory>
                title[0x7f17f80fcd90 1 1   ]: "Peru" 
            Philippines[0x7f17f80fcd00 1 1   ]: <directory>
                title[0x7f17f80fcc70 1 1   ]: "Philippines" 
            Poland[0x7f17f80fcbe0 1 1   ]: <directory>
                title[0x7f17f80fcb50 1 1   ]: "Poland" 
            Portugal[0x7f17f80fcac0 1 1   ]: <directory>
                title[0x7f17f80fca30 1 1   ]: "Portugal" 
            Puerto Rico[0x7f17f80fc9a0 1 1   ]: <directory>
                title[0x7f17f80fc910 1 1   ]: "Puerto Rico" 
            Republic of Guinea-Bissau[0x7f17f80fc880 1 1   ]: <directory>
                title[0x7f17f80fc7f0 1 1   ]: "Republic of Guinea-Bissau" 
            Romania[0x7f17f80fc760 1 1   ]: <directory>
                title[0x7f17f80fc6d0 1 1   ]: "Romania" 
            Russia[0x7f17f80fc640 1 1   ]: <directory>
                title[0x7f17f80fc5b0 1 1   ]: "Russia" 
            Rwanda[0x7f17f80fc520 1 1   ]: <directory>
                title[0x7f17f80fc490 1 1   ]: "Rwanda" 
            Saint Lucia[0x7f17f80fc400 1 1   ]: <directory>
                title[0x7f17f80fc370 1 1   ]: "Saint Lucia" 
            Saudi Arabia[0x7f17f80fc2e0 1 1   ]: <directory>
                title[0x7f17f80fc250 1 1   ]: "Saudi Arabia" 
            Serbia[0x7f17f80fc1c0 1 1   ]: <directory>
                title[0x7f17f80fc130 1 1   ]: "Serbia" 
            Singapore[0x7f17f80fc0a0 1 1   ]: <directory>
                title[0x7f17f80fc010 1 1   ]: "Singapore" 
            Slovakia[0x7f17f80fbf80 1 1   ]: <directory>
                title[0x7f17f80fbef0 1 1   ]: "Slovakia" 
            Slovenia[0x7f17f80fbe60 1 1   ]: <directory>
                title[0x7f17f80fbdd0 1 1   ]: "Slovenia" 
            South Africa[0x7f17f80fbd40 1 1   ]: <directory>
                title[0x7f17f80fbcb0 1 1   ]: "South Africa" 
            South Korea[0x7f17f80fbc20 1 1   ]: <directory>
                title[0x7f17f80fbb90 1 1   ]: "South Korea" 
            Spain[0x7f17f80fbb00 1 1   ]: <directory>
                title[0x7f17f80fba70 1 1   ]: "Spain" 
            Sri Lanka[0x7f17f80fb9e0 1 1   ]: <directory>
                title[0x7f17f80fb950 1 1   ]: "Sri Lanka" 
            Sweden[0x7f17f80fb8c0 1 1   ]: <directory>
                title[0x7f17f80fb830 1 1   ]: "Sweden" 
            Switzerland[0x7f17f80fb7a0 1 1   ]: <directory>
                title[0x7f17f80fb710 1 1   ]: "Switzerland" 
            Taiwan[0x7f17f80fb680 1 1   ]: <directory>
                title[0x7f17f80fb5f0 1 1   ]: "Taiwan" 
            Tanzania[0x7f17f80fb560 1 1   ]: <directory>
                title[0x7f17f80fb4d0 1 1   ]: "Tanzania" 
            Thailand[0x7f17f80fb440 1 1   ]: <directory>
                title[0x7f17f80fb3b0 1 1   ]: "Thailand" 
            Togo[0x7f17f80fb320 1 1   ]: <directory>
                title[0x7f17f80fb290 1 1   ]: "Togo" 
            Trinidad and Tobago[0x7f17f80fb200 1 1   ]: <directory>
                title[0x7f17f80fb170 1 1   ]: "Trinidad and Tobago" 
            Tunisia[0x7f17f80fb0e0 1 1   ]: <directory>
                title[0x7f17f80fb050 1 1   ]: "Tunisia" 
            Turkey[0x7f17f80fafc0 1 1   ]: <directory>
                title[0x7f17f80faf30 1 1   ]: "Turkey" 
            Uganda[0x7f17f80faea0 1 1   ]: <directory>
                title[0x7f17f80fae10 1 1   ]: "Uganda" 
            Ukraine[0x7f17f80fad80 1 1   ]: <directory>
                title[0x7f17f80facf0 1 1   ]: "Ukraine" 
            United Arab Emirates[0x7f17f80fac60 1 1   ]: <directory>
                title[0x7f17f80fabd0 1 1   ]: "United Arab Emirates" 
            Uruguay[0x7f17f80fab40 1 1   ]: <directory>
                title[0x7f17f80faab0 1 1   ]: "Uruguay" 
            USA[0x7f17f80faa20 1 1   ]: <directory>
                title[0x7f17f80fa990 1 1   ]: "USA" 
            Venezuela[0x7f17f80fa900 2 1   ]: <directory>
                title[0x7f17f80fa870 1 1   ]: "Venezuela" 
         V-Subscriber: /root/showtime/src/ecmascript/es_prop.c:584 [global.settings.apps.nodes.rad.io.nodes.country.options<0x7f17f8104fd0>] @ 0x7f17f81a4e38 p=0x7f17f8104fd0 value=global.settings.apps.nodes.rad.io.nodes.country.options<0x7f17f8104fd0>
         C-Subscriber: /root/showtime/src/ecmascript/es_prop.c:584 [global.settings.apps.nodes.rad.io.nodes.country.options<0x7f17f8104fd0>] @ 0x7f17f81a4e38 p=0x7f17f8104fd0 value=global.settings.apps.nodes.rad.io.nodes.country.options<0x7f17f8104fd0>
    cleanFavorites[0x7f17f80fa7e0 2 1   ]: <directory>
        type[0x7f17f80fa750 1 1   ]: "action" 
        enabled[0x7f17f80fa6c0 1 1   ]: 1
        metadata[0x7f17f80fa630 1 1   ]: <directory>
            title[0x7f17f80fa5a0 1 1   ]: "Clean My Favorites" 
        action[0x7f17f80fa510 2 1   ]: <void>
         V-Subscriber: /root/showtime/src/ecmascript/es_prop.c:584 [global.settings.apps.nodes.rad.io.nodes.cleanFavorites.action<0x7f17f80fa510>] @ 0x7f17f81a4db0 p=0x7f17f80fa510 value=global.settings.apps.nodes.rad.io.nodes.cleanFavorites.action<0x7f17f80fa510>
         C-Subscriber: /root/showtime/src/ecmascript/es_prop.c:584 [global.settings.apps.nodes.rad.io.nodes.cleanFavorites.action<0x7f17f80fa510>] @ 0x7f17f81a4db0 p=0x7f17f80fa510 value=global.settings.apps.nodes.rad.io.nodes.cleanFavorites.action<0x7f17f80fa510>

#5 Updated by Andreas Smas over 6 years ago

It looks perfectly fine but still doesn't work. Very weird.

#6 Updated by Anatoly Shcherbinin over 6 years ago

I also have problems with createMultyOpt:
My code is:

var settingsView = plugin.createSettings(plugin_info.title, plugin.path + plugin_info.icon, "Settings of "+plugin_info.title+" plugin");
    settingsView.createMultiOpt("maxres", "Max resolution", [[240, '240p'],[360,'360p'],[480, '480p'],[720,'720p'],[1080, '1080p'],[Infinity, 'Max', true]], function(v){
        settings.maxres = v;
    });

#7 Updated by Leonid Protasov over 6 years ago

Previous post error is:

vk              [ERROR]: TypeError (unexpected type) at (null):0
vk              [ERROR]: STACK DUMP: TypeError: unexpected type
                             duk_api_stack.c:1266
                             Proxy  native strict construct preventsyield
                             makeProp showtime/prop:68
                             anon showtime/prop:28 preventsyield
                             anon showtime/settings:220
                             anon file:///Users/anatoly/Desktop/test/showtime-vk-plugin/vk.js:45
                             global file:///Users/anatoly/Desktop/test/showtime-vk-plugin/vk.js:796 preventsyield
                             call  native strict preventsyield
                             global dataroot://resources/ecmascript/legacy/api-v1.js:123 preventsyield

#8 Updated by Leonid Protasov over 6 years ago

Looks it eventually was fixed. I just had something broken in settings files locally. Working ok on 4.7.532.

#9 Updated by Andreas Smas over 6 years ago

  • Status changed from Need feedback to Invalid

#10 Updated by Leonid Protasov over 6 years ago

  • Related to Bug #2424: The array list created via settings.createMultiOpt in ecmascript mode is not shown in settings added

Also available in: Atom PDF