Hybrid View

  1. #1
    Sencha User
    Join Date
    Sep 2012
    Posts
    13
    Vote Rating
    0
    keweli is on a distinguished road

      0  

    Default Unanswered: .join("") doesn't work in 2.1.0

    Unanswered: .join("") doesn't work in 2.1.0


    After changing from 2.0.1 to 2.1.0, join("") no longer works in my json files:

    Code:
            "lyrics": [
                "沒有說過 第一個是你<br />", 
                "不鬆手都給身走 有誰能說我未夠<br />"
            ].join("")
    I must remove .join("") for it to work but then it will show in the comma in every sentence.

    Any ideas? Thanks

  2. #2
    Sencha User
    Join Date
    Sep 2012
    Posts
    17
    Vote Rating
    0
    rotten69 is on a distinguished road

      0  

    Default


    I think it is supposed to be html rather than "lyrics". So change to it html without the quotes and make sure it is a property in config.

  3. #3
    Sencha User
    Join Date
    Sep 2012
    Posts
    13
    Vote Rating
    0
    keweli is on a distinguished road

      0  

    Default


    The lyrics is part of a json file which has multiple lines. It's not the html in a component. It was working fine in the previous version

  4. #4
    Sencha User
    Join Date
    Apr 2010
    Location
    China
    Posts
    227
    Answers
    64
    Vote Rating
    20
    haduki will become famous soon enough haduki will become famous soon enough

      0  

    Default


    This is NOT a json !
    谁告诉你这是json的,这明明是js片段,".join()"是个方法,需要js解释器才能运行。
    json是个数据格式,和平台无关,你觉得你这样写,非JS语言的平台认得出来么?
    I write English by translator.

  5. #5
    Sencha User
    Join Date
    Sep 2012
    Posts
    13
    Vote Rating
    0
    keweli is on a distinguished road

      0  

    Default


    Yeah it's not really json, but it used to work loading it using a json store.

    Code:
    {"tracks":[
        {
            "id": 1,
            "title": "Song",
            "lyrics": [
                "AAAAA AAAAAA<br />",
                "BBBBBBBB<br />"
            ]
        }
    ]}
    How would I join the lyric lines then?

Thread Participants: 2