4 Replies Latest reply on Sep 24, 2012 5:38 AM by Harbs.

    Error when I do an insertLabel() on a PageItem

    AquaMicha1305

      Hi everyone,

       

      When I want to do an insertLabel() on a PageItem thanks to these lines of code:

        var vIdLabel:String = vPageItem.id.toString();

        vPageItem.insertLabel("id", vIdLabel);

      The variable vPageItem is not null and it is valid. Also the vIdLabel is not null and contain a value like "251".

       

      With these lines of code I get this error: "Invalid value for parameter 'value' of method 'insertLabel'. Expected String, but received null."

       

      Someone can help me or have already encountered this error ?

       

      Here I give you the CSSDK Documentation for insertLabel() on a PageItem.

      PageItem

      insertLabel(keyParam:String = null, valueParam:String = null):void

      Sets the label to the value associated with the specified key.

       

      Thanks you for your response,

      Mikaël Chevalier - Aquafadas